San Francisco's gay male community has been hit harder by the HIV/AIDS epidemic than any other community in the world. By 1995, 20,530 of the estimated 58,000 gay men had been diagnosed with AIDS. However, the epidemic has also been more effectively contained within San Francisco than anywhere else, as evidenced by rapidly dropping AIDS incidence and mortality rates. This article reviews the epidemiology of HIV/AIDS among men who report sex with men (MSM) in San Francisco and the successful prevention efforts in this community. Also cited are areas in which the San Francisco prevention model has been less effective, in particular young MSM and gay men of color. San Francisco's experience yields many lessons about the successes and challenges of HIV prevention. Although community mobilization has been effective in reducing infection rates, innovative techniques to address the special needs of young MSM and to prevent the return to unsafe sex among all MSM are needed.