Many studies have shown that prior HSV-2 infection is associated with an increased risk for HIV infection. Acyclovir is the most widely studied and clinically utilized antiviral for the suppression of HSV-2 infection. This study will evaluate the efficacy of twice-daily dosing of acyclovir in preventing HIV infection in both WSM and MSM with genital herpes. For this study, WSM will be enrolled in Lusaka, Zambia; Harare, Zimbabwe; and Johannesburg, South Africa; MSM will be enrolled in Lima and Pucallpa, Peru; Seattle, Washington, USA; New York City, New York, USA; and San Francisco, California, USA.