Epidemic HIV-1 infections were first recognized in Thailand in 1988 but increased dramatically in the 1990s primarily as a result of sexual transmission. The Ministry of Public Health instituted programs, including condom promotion during commercial sex, and health education to prevent HIV transmission. We assessed the HIV infection prevalence and risk behaviors among eight cohorts of 21-year-old randomly selected male military conscripts in northern Thailand between 1991 and 1998 to evaluate temporal trends in HIV infection and risk behavior. The prevalence of HIV was 11.4% to 11.9% in 1991 through 1993 and progressively fell to 2.4% in 1998. The men reported progressive decreases in commercial sex from 80% in 1991 to 38% in 1998, increases in condom use for commercial sex to greater than 95% in 1998, and decreases in lifetime history of a sexually transmitted infection from 42% in 1991 to 4.4% in 1997. There was an increasing proportion of men who reported a history of injecting illicit drugs, however, which involved 1.0% of the men in 1991 but 4.2% in 1997. The population attributable risk of drug use for HIV infection increased in recent years; the proportion of HIV-positive men with a history of drug use increased from 1.0% in 1991 to 25.8% in 1998. The public health program to prevent the sexual transmission of HIV in Thailand continues to be highly successful. Nevertheless, injection drug use has emerged as an important risk behavior and is maintaining endemic HIV transmission in Thailand.