Cytomegalovirus (CMV) disease is a common complication of advanced human immunodeficiency virus (HIV) infection. Administration of oral valaciclovir, a valine ester of acyclovir, achieves sufficient plasma acyclovir levels to inhibit many clinical isolates. Acyclovir has been associated with enhanced survival in AIDS but not with CMV disease prevention. CMV-seropositive patients (1227) with CD4 cell counts <100/mm3 were enrolled in a randomized, double-blind trial. Valaciclovir, 8 g/day, was compared with acyclovir, 3.2 or 0.8 g/day, for CMV prevention; all three arms were compared for survival. The confirmed CMV disease rate was 11.7% among valaciclovir recipients and 17.5% in the pooled acyclovir arms, a 33% reduction in risk. Time to confirmed CMV disease was significantly longer for the valaciclovir group (P = .03). A trend toward earlier mortality for valaciclovir recipients was seen (P = .06). Toxicity and earlier medication discontinuation were more common in this group. Valaciclovir significantly reduces the risk of CMV disease. Further exploration of a better-tolerated dose is warranted.