Outcome of hepatitis B virus infection in homosexual men and its relation to prior human immunodeficiency virus infection. To investigate the effect of human immunodeficiency virus type 1 (HIV-1) infection on subsequent hepatitis B virus (HBV) infection, HIV antibody was sought in homosexual men who developed HBV infection during a hepatitis B vaccine trial. Among 134 unvaccinated HIV-1-negative men, 7% became HBV carriers, 64% had viremia, and 42% had clinical illness. Among vaccinated HIV-1-negative men, HBV infection severity decreased with number of vaccine doses administered. When adjusted for prior hepatitis B vaccination status, persons with HIV-1 infection preceding HBV infection had a significantly higher risk of developing HBV carriage, viremia, prolonged ALT elevation, and clinical illness. Among HIV-1-infected men, the risk of HBV carriage was increased in unvaccinated persons (21%) and those who failed to respond to vaccination (31%) and further increased in those who received vaccine doses at the time they developed new HBV infection (56%-80%), suggesting inactivated hepatitis B vaccine may temporarily impair the immune response to HBV infection in HIV-1-infected persons. HIV-1 infection was also associated with reduced alanine aminotransferase elevations during the first 36 months of follow-up of men who became HBV carriers. 