For all of the last century, the economy of South Africa, and so also of its neighbouring countries, has depended on migrant labour from rural areas. This is particularly so for the mining industry, especially hard-rock mining, and this has led to a system of 'oscillating' migration whereby men from rural areas come to live and work on the mines, without their wives or families, but return home regularly. This pattern of oscillating migration is an important determinant of health and, especially at the start of the epidemic, contributed to the spread of HIV in the region. In this paper we describe an extensive, community-Ied, intervention designed to develop ways to manage and limit the spread of HIV in.Carletonville, the largest gold-mining complex in the world. We first consider the political and economic context within which earlier attempts to develop HIV intervention programmes were made and then show how the Carletonville project was designed to go beyond these early attempts and avoid some of the pitfalls encountered then. The Carletonville project was based on a set of assumptions. First, that HIV should not be treated as another biomedical problem to be dealt with by changing individual behaviour but rather that it must be understood within the social, cultural and normative conditions that pertain in particular communities. Secondly, that in the short to medium term the most effective interventions would involve the treatment of sexually transmitted diseases and the use of community-based peer educators to promote safer sexual practices and the use of condoms. Thirdly, that for the intervention to be sustainable in the long term, it would require the full commitment of all the local stakeholders including the state, the private sector, the trade unions and local community-based organizations. Fourthly, that in order to understand the nature and pattern of the epidemic, to focus our intervention efforts so that they have the maximum effect, to make sensible predictions as to the likely future course of the epidemic, and finally, to evaluate the impact of the interventions, it is essential to carry out detailed monitoring and evaluation of the epidemic using both biomedical and behavioural markers of infection and behaviour. The background and current status of the project are described in detail. The surveys have shown that the situation is even worse than envisaged at the start of the project and have highlighted the importance of protecting young women from infection. Valuable lessons have been learnt concerning the reasons for the continued spread of the epidemic and some success has been achieved especially in the empowerment of women at high risk and the mobilization of people from all sectors of the community to join the fight against HIV/AIDS. It is still too early to show significant changes in STI or HIV rates but it is hoped that this will become apparent over the course of the next one or two years.