This report updates and combines earlier versions of guidelines for the prevention and treatment of opportunistic infections (OIs) in HIV-infected adults (i.e., persons aged >/=18 years) and adolescents (i.e., persons aged 13--17 years), last published in 2002 and 2004, respectively. It has been prepared by the Centers for Disease Control and Prevention (CDC), the National Institutes of Health (NIH), and the HIV Medicine Association (HIVMA) of the Infectious Diseases Society of America (IDSA). The guidelines are intended for use by clinicians and other health-care providers, HIV-infected patients, and policy makers in the United States. These guidelines address several OIs that occur in the United States and five OIs that might be acquired during international travel. Topic areas covered for each OI include epidemiology, clinical manifestations, diagnosis, prevention of exposure; prevention of disease by chemoprophylaxis and vaccination; discontinuation of primary prophylaxis after immune reconstitution; treatment of disease; monitoring for adverse effects during treatment; management of treatment failure; prevention of disease recurrence; discontinuation of secondary prophylaxis after immune reconstitution; and special considerations during pregnancy. These guidelines were developed by a panel of specialists from the United States government and academic institutions. For each OI, a small group of specialists with content-matter expertise reviewed the literature for new information since the guidelines were last published; they then proposed revised recommendations at a meeting held at NIH in June 2007. After these presentations and discussion, the revised guidelines were further reviewed by the co-editors; by the Office of AIDS Research, NIH; by specialists at CDC; and by HIVMA of IDSA before final approval and publication. The recommendations are rated by a letter that indicates the strength of the recommendation and a Roman numeral that indicates the quality of evidence supporting the recommendation, so that readers can ascertain how best to apply the recommendations in their practice environments. Major changes in the guidelines include 1) greater emphasis on the importance of antiretroviral therapy for the prevention and treatment of OIs, especially those OIs for which no specific therapy exists; 2) information regarding the diagnosis and management of immune reconstitution inflammatory syndromes; 3) information regarding the use of interferon-gamma release assays for the diagnosis of latent Mycobacterium tuberculosis (TB) infection; 4) updated information concerning drug interactions that affect the use of rifamycin drugs for prevention and treatment of TB; 5) the addition of a section on hepatitis B virus infection; and 6) the addition of malaria to the list of OIs that might be acquired during international travel. This report includes eleven tables pertinent to the prevention and treatment of OIs, a figure that pertains to the diagnois of tuberculosis, a figure that describes immunization recommendations, and an appendix that summarizes recommendations for prevention of exposure to opportunistic pathogens.