To measure trends in HIV incidence and serial prevalence by sex in a intravenous drug users (IDUs) and heterosexuals (HT) cohort recruited in a counselling centre in Valencia (1988–2005). Serial prevalence and incidence rates were calculated and modelled by logistic and Poisson regression respectively. 5948 IDUs and 13343 HT were recruited. Prevalence was higher among female IDUs (46% vs. 41%), and female HT (4.1% vs. 2%). For IDUs, an interaction (P = 0.005) between sex and calendar was detected. Age-adjusted prevalence showed faster yearly decline in men (OR = 0.87 95%CI: 0.85–0.88) than in women (OR = 0.91 95%CI: 0.88–0.93). Incidence was higher in female IDUs (9.79% p-y) than in men, (5.38% p-y) with an annual decrease for both of 11%. HIV incidence was higher in female HT (0.62% p-y) compared to men 0.23% p-y with a 21% yearly decline. Gender differences in HIV prevalence and incidence trends have been detected. Women showed an increased vulnerability to infection in a country whose HIV epidemic has been largely driven by IDUs.