Background: Quantification and description of patients recently infected by HIV can provide an accurate estimate of the dynamics of HIV transmission. Between 2006 and 2008 in Catalonia, we estimated the prevalence of recent HIV infection among newly diagnosed cases, described the epidemiological characteristics of the infection according to whether it was recent, long-standing or advanced, and identified factors associated with recent infection. Methods: A Test for Recent Infection (TRI) was performed in serum samples from patients newly diagnosed with HIV. Two different TRI were used: the Vironostika-LS assay (January 2006-May 2007) and the BED-CEIA CEIA (June 2007 onwards). Samples were obtained within the first 6 months of diagnosis. Patients whose samples tested positive in the TRI were considered recently infected. Results: Of 1125 newly diagnosed patients, 79.9 were men (median age, 35.4 years), 38.7 were born outside Spain, 48.9 were men who have sex with men (MSM) and 10.6 presented other sexually transmitted infections. The overall percentage of recent infection was 23.0, which increased significantly, from 18.1 in 2006 to 26.2 in 2008. This percentage was higher for patients from South America (27.6). Factors associated with recent infection were acquiring infection through sexual contact between MSM [odds ratio (OR) 2.0; 95 confidence interval (95 CI) 1.1-3.9], compared with acquiring infection through heterosexual relations and being under 30 years of age (OR 5.9; 95 CI 1.9-17.4), compared with being over 50 years of age. Conclusion: The highest percentage of recent infection was identified in MSM, suggesting either a higher incidence or a greater frequency of HIV testing. Information regarding testing patterns is necessary to correctly interpret data from recently infected individuals. Systems to monitor the HIV epidemic should include both parameters. © 2011 The Author 2011. Published by Oxford University Press on behalf of the European Public Health Association. All rights reserved.