Peer education is a community-based intervention being implemented worldwide as an approach to HIV prevention. However, its results are inconsistent, with little consensus on why some projects succeed while others fail. Considering peer education as an 'intervention-in-context', we systematically compare the context and the implementation of two peer education interventions run by sex workers, one in India and one in South Africa, which produced contrasting outcomes. In so doing, we aim to identify key factors in the projects' successes or failures that may inform future peer education efforts. The Indian project's relative success was facilitated (1) by a more stable and supportive social, material and political context, and (2) by a community development ethos which devoted significant resources to sex workers' involvement, ownership and empowerment, as opposed to a biomedical approach which marginalised sex workers' concerns. We conclude with lessons learned and implications for current trends in peer education.