Objective: To delineate the population attributable fraction (PAF) of transactional sex in prevalent cases of HIV infection in the male adult population of Accra, Ghana. Design and methods: Cross-sectional study of clients who visited a sex worker (SW), of boyfriends of SW and of male personnel in prostitution venues. A questionnaire was administered and urine obtained for detection of anti-HIV antibodies. The PAF of prevalent HIV acquired from SW was calculated using a combination of data from this survey of clients, from on-going SW surveys, the national HIV surveillance system and the national census. Results HIV prevalence was 4.9% (8/162) among clients of mobile SW, 15.8% (53/ 335) among clients of home-based SW, 17.5% (10/57) among personnel and 32.1% (9/28) among boyfriends. A condom was used in 90% of intercourses, according to clients. Non-use of a condom was clustered in selected locations and independently associated with older age of client, frequency of intercourse with SW in the last year and current urethritis. Among the male population of Accra aged 15–59 years, 84% of prevalent cases of HIV were attributable to transactional sex. A sensitivity analysis showed that under various assumptions PAF varied between 47% and 100%. Conclusions: In Accra, approximately four-fifths of prevalent cases of HIV in adult males were acquired from SW. Comprehensive interventions providing education, condoms and treatment for sexually transmitted diseases for SW and their clients should be approached as other public health priorities and provided in all cities, large and small, of West Africa.