Objectives: Laboratory, clinical and sequence-based data were combined to assess the differential uptake of voluntary confidential HIV testing (VCT) according to risk and explore the occurrence of HIV transmission from individuals with recently acquired HIV infection, before the diagnostic opportunity. Methods: Between 1999 and 2002, nearly 30 000 anonymous tests for previously undiagnosed HIV infection were conducted among men who have sex with men (MSM) attending 15 sentinel sexually transmitted infection (STI) clinics in England, Wales and Northern Ireland. Using a serological testing algorithm, undiagnosed HIV-infected men were categorised into those with recent and non-recent infection. VCT uptake was compared between HIV-negative, recently HIV-infected and non- recently HIV-infected men. A phylogenetic analysis of HIV pal sequences from 127 recently HIV-infected MSM was conducted to identify instances in which transmission may have occurred before the diagnostic opportunity. Results: HIV-negative MSM were more likely to receive VCT at clinic visits compared with undiagnosed HIV- infected MSM (56% (14 020/24 938) vs 31% (335/1072); p<0.001). Recently HIV-infected MSM were more likely to receive VCT compared with those with non-recent infections (42% (97/229) vs 28% (238/844); p<0.001). 22% (95/425) of undiagnosed HIV-infected MSM with STI received VCT. Phylogenetic analysis revealed at least seven transmissions may have been generated by recently HIV-infected MSM: a group that attended STI clinics soon after seroconversion. Conclusions: The integration of clinical, laboratory and sequence-based data reveals the need for specific targeting of the recently HIV exposed, and those with STI, for VCT. VCT promotion alone may be limited in its ability to prevent HIV transmission.