Improved knowledge, better programmes and policies, effective treatment and other scientific developments have reduced levels of new HIV infections globally. Evidence shows that programmes that prevent HIV among sex workers and their clients are most successful when all aspects of vulnerability are addressed and when they are underpinned by policy that advances human rights. This is particularly important in the context of the introduction of antiretroviral-based HIV prevention, which could have harmful consequences if not well planned. In this context, law and policy on sex work should not be limited to aiming to deliver medicine and services to sex workers in dangerous working conditions. A high-priority aim should be to ensure that the law enables commercial sex to take place in the safest possible conditions. To achieve this, the meaningful involvement of sex workers at all levels of the response is crucial. However, although that has been recognized in theory, it has not been achieved in practice.