This report updates and combines into one document earlier versions of guidelines for preventing and treating opportunistic infections (OIs) among HIV-exposed and HIV-infected children, last published in 2002 and 2004, respectively. These guidelines are intended for use by clinicians and other health-care workers providing medical care for HIV-exposed and HIV-infected children in the United States. The guidelines discuss opportunistic pathogens that occur in the United States and one that might be acquired during international travel (i.e., malaria). Topic areas covered for each OI include a brief description of the epidemiology, clinical presentation, and diagnosis of the OI in children; prevention of exposure; prevention of disease by chemoprophylaxis and/or 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; and discontinuation of secondary prophylaxis after immune reconstitution. A separate document about preventing and treating of OIs among HIV-infected adults and postpubertal adolescents (Guidelines for the Prevention and Treatment of Opportunistic Infections in HIV-Infected Adults and Adolescents) was prepared by a working group of adult HIV and infectious disease specialists. The guidelines were developed by a panel of specialists in pediatric HIV infection and infectious diseases (the Pediatric Opportunistic Infections Working Group) from the U.S. government and academic institutions. For each OI, a pediatric specialist with content-matter expertise reviewed the literature for new information since the last guidelines were published; they then proposed revised recommendations at a meeting at the National Institutes of Health (NIH) in June 2007. After these presentations and discussions, the guidelines underwent further revision, with review and approval by the Working Group, and final endorsement by NIH, CDC, the HIV Medicine Association (HIVMA) of the Infectious Diseases Society of America (IDSA), the Pediatric Infectious Disease Society (PIDS), and the American Academy of Pediatrics (AAP). The recommendations are rated by a letter that indicates the strength of the recommendation and a Roman numeral that indicates the quality of the evidence supporting the recommendation so readers can ascertain how best to apply the recommendations in their practice environments. An important mode of acquisition of OIs, as well as HIV infection among children, is from their infected mother; HIV-infected women coinfected with opportunistic pathogens might be more likely than women without HIV infection to transmit these infections to their infants. In addition, HIV-infected women or HIV-infected family members coinfected with certain opportunistic pathogens might be more likely to transmit these infections horizontally to their children, resulting in increased likelihood of primary acquisition of such infections in the young child. Therefore, infections with opportunistic pathogens might affect not just HIV-infected infants but also HIV-exposed but uninfected infants who become infected by the pathogen because of transmission from HIV-infected mothers or family members with coinfections. These guidelines for treating OIs in children therefore consider treatment of infections among all children, both HIV-infected and uninfected, born to HIV-infected women. Additionally, HIV infection is increasingly seen among adolescents with perinatal infection now surviving into their teens and among youth with behaviorally acquired HIV infection. Although guidelines for postpubertal adolescents can be found in the adult OI guidelines, drug pharmacokinetics and response to treatment may differ for younger prepubertal or pubertal adolescents. Therefore, these guidelines also apply to treatment of HIV-infected youth who have not yet completed pubertal development. Major changes in the guidelines include 1) greater emphasis on the importance of antiretroviral therapy for preventing and treating OIs, especially those OIs for which no specific therapy exists; 2) information about the diagnosis and management of immune reconstitution inflammatory syndromes; 3) information about managing antiretroviral therapy in children with OIs, including potential drug--drug interactions; 4) new guidance on diagnosing of HIV infection and presumptively excluding HIV infection in infants that affect the need for initiation of prophylaxis to prevent Pneumocystis jirovecii pneumonia (PCP) in neonates; 5) updated immunization recommendations for HIV-exposed and HIV-infected children, including hepatitis A, human papillomavirus, meningococcal, and rotavirus vaccines; 6) addition of sections on aspergillosis; bartonella; human herpes virus-6, -7, and -8; malaria; and progressive multifocal leukodystrophy (PML); and 7) new recommendations on discontinuation of OI prophylaxis after immune reconstitution in children. The report includes six tables pertinent to preventing and treating OIs in children and two figures describing immunization recommendations for children aged 0--6 years and 7--18 years. Because treatment of OIs is an evolving science, and availability of new agents or clinical data on existing agents might change therapeutic options and preferences, these recommendations will be periodically updated and will be available at http://AIDSInfo.nih.gov.