Since the end of the 1980s, primary anti-Pneumocystis carinii pneumonia (PCP) prophylaxis has become a fundamental part of the global AIDS control strategy in industrialized countries. The widespread adoption of anti-PCP chemoprophylaxis has been a key element in prolonging the survival of patients with AIDS. There is general agreement on the need to begin chemoprophylaxis when individual CD4+ cell counts drop below the value of 200/microL. However, PCP still develops in up to 27% of susceptible HIV-infected patients despite regular prophylaxis intake. Failure of chemoprophylaxis may depend on different factors. The choice of the regimen and the patient's compliance to it have been the first variables to be identified, whereas the importance of the residual cellular immune function as complementary protective mechanism against PCP has emerged in subsequent clinical studies. Albeit of limited general concern, issues such as P. carinii drug resistance and defective drug absorption may play some role in prophylaxis failure in selected patients. Regarding the epidemiology of primary and recurrent episodes of PCP, recent studies based on genetic fingerprinting techniques revealed that interhuman transmission of the organism could be more relevant than so far expected, thus raising some concern of the possibility of nosocomial spread among susceptible individuals. The downgrading tendency of immune competence in HIV infection and the related increasing risk of developing PCP make it possible to envisage a two-step chemoprophylactic strategy, with the most effective compound, cotrimoxazole, to be reserved for the last and most risky disease stage, when immune response no longer provides any support for preventing the development of PCP.