Female sex work is one of the big vectors of the world HIV pandemic, sometimes being the bridge between infected drug users and heterosexual men who buy sex from them.
But policymakers have squabbled about how best to deal with the question.
They have wrestled with initiatives such as outreach programmes to promote condom use and widen access to HIV drugs, changing policing practices or making laws softer or harsher.
Yet there is little agreement about which policies work best in reducing the HIV risk, both for sex workers and their clients.
Of all the main policy options, decriminalisation was by far the most effective, they found.
By practising their trade legally, female sex workers were likelier to get advice about safe sex, use condoms and gain access to drugs that suppress the AIDS virus.
They also became less exposed to sexual violence from police and more able to refuse demands for unprotected sex from customers - both of which are risks for spreading the human immunodeficiency virus (HIV).
Other methods could be useful, too, depending on the location.
In Kenya, for instance, if badly-infected sex workers were given access to virus-suppressing drugs, this would help to reduce new cases of HIV by more than a third over the next decade.
The researchers, led by Kate Shannon of the University of British Columbia in Vancouver, Canada, acknowledged they had blanks in their database.
Most of these published investigations were conducted in Asia. Very few took place in sub-Saharan Africa, Russia and eastern Europe, where HIV transmission through sex work is a huge problem.
A 2012 investigation in 50 low-and middle-income countries found that nearly 12 per cent of sex workers there had HIV.
