Objectives Sex workers (SW) are key populations at an increased risk of HIV infection. This study aimed to characterise risk-taking behaviours and assess HIV prevalence among SW in Portugal. Methods A cross-sectional survey was conducted with 1040 SW using a participatory research approach. SW were recruited in sex-work locations and communitybased organisation offices. Data were collected through a questionnaire with trained interviewers. An HIV rapid test was performed in 213 respondents. Results Reported HIV prevalence was 8%: 17.6% of man-to-woman transgenders, 7.4% of women and 5% of men. Of SW reportedly living with HIV, 52.2% reported ever injecting drug use. Inconsistent condom use with clients in the last month was higher among male SW (26.5%) and with non-paying partners in the last year was higher among women (71.3%). Among reported HIV-positive SW, the proportions of inconsistent condom use were high. In multivariate regression analysis, reported HIV infection remained significantly higher among transgenders (OR 6.4; 95% CI 1.7 to 24.3), those older (OR 5.1; 95% CI 1.3 to 21.1), working outdoors (OR 5.4; 95% CI 1.9 to 15.6), having ever used psychoactive substances (OR 4.1; 95% CI 2.2 to 7.7) and earning ≤1000 per month (OR 2.6; 95% CI 1.2 to 5.9). Of those who had an HIV rapid test, 8.9% were reactive; 73.7% were unaware of their seropositivity. Conclusions The HIV infection burden in SW is high. Efforts to promote HIV testing must be sustained in order to reduce undiagnosed infection. The diverse risk profiles of SW must be addressed in targeted HIV interventions. Prevention interventions should be systematically implemented within most-at-risk subgroups of SW.