To investigate the rapid HIV epidemic in Latvia, 97 newly detected individuals were sampled in 2000-2001. To establish the molecular epidemiology we sequenced the env V3 and gag p17 regions of the HIV genome and compared them with reference sequences using phylogenetic analyses. As expected, the vast majority (n = 88; 91%) were intravenous drug users (IDUs) from the Riga region. Also, the majority of the investigated individuals (n = 93; 96%) were found to carry a subtype A1 virus that may have entered the Latvian IDU population several times. In addition, one IDU was infected with CRF03_AB and three other individuals, who had been infected through sexual contacts, carried subtype B virus. Thus, subtype A1 dominates the Latvian epidemic and is strongly associated with the IDU risk group. Although some spread of subtype A1 has occurred in the heterosexual group, subtype B dominates among homosexually and heterosexually infected individuals.