Loss of T cell number and function during HIV infection or secondary to pharmacologic immunosuppression renders individuals susceptible to opportunistic infections, including Pneumocystis carinii pneumonia. Because costimulatory receptors are critical for optimal T cell function, we hypothesized that these proteins would regulate susceptibility to opportunistic infections. We found that despite normal T cell numbers, mice deficient in the costimulatory molecules CD2 and CD28 spontaneously developed P. carinii pneumonia. In experiments using intratracheal injection of P. carinii organisms to induce infection, the loss of CD28 alone was sufficient to render mice susceptible to acute infection; however, the organism was eventually cleared. Examination of inflammatory responses to P. carinii revealed that mice deficient in both CD2 and CD28 accumulated CD8+ T cells in their lungs in response to infection and demonstrated markedly reduced specific Ab titers. Analysis of cytokine profiles suggested that regulation of IL-10 and IL-15 may be important elements of the response to this pathogen. Thus, costimulatory molecule function is critical in determining the initial susceptibility to infection with P. carinii. Analysis of immunologic responses in these mice may provide important insights into the defects that render individuals susceptible to opportunistic infection, and provide opportunities for novel immunologically based therapies.