General information only. It does not replace advice from a health professional. For severe or sudden breathlessness, blue lips or chest pain on breathing, call emergency services.

What it is
Our lungs are constantly exposed to microbes from the air and the mouth, and defend themselves with several layers: mucus and cilia, alveolar macrophages, antibodies, neutrophils and T lymphocytes (see the lung's defences). When one of these layers fails, organisms that would do nothing to a healthy person can cause severe pneumonia. These are called opportunistic infections.
The type of defence that fails points to the organism:
| Type of immunosuppression | Examples | Most typical lung organisms |
|---|---|---|
| Neutropenia (few neutrophils) | Intensive chemotherapy, acute leukaemia | Bacteria (including Pseudomonas), Aspergillus and other moulds |
| T-cell defect | HIV with CD4 < 200/µl, transplants, corticosteroids, some drugs (fludarabine, alemtuzumab) | Pneumocystis, CMV, mycobacteria, Nocardia, Cryptococcus, viruses |
| Antibody defect | Myeloma, chronic lymphocytic leukaemia, rituximab, congenital immunodeficiencies | Pneumococcus, Haemophilus, encapsulated bacteria |
| Anti-TNF drugs and other biologics | Rheumatoid arthritis, inflammatory bowel disease | Tuberculosis (reactivation), Legionella, endemic fungi |
| Asplenia (no spleen) | Splenectomy | Pneumococcus and other encapsulated bacteria: overwhelming sepsis |
In addition, common respiratory viruses (influenza, RSV, SARS-CoV-2, parainfluenza, adenovirus) and ordinary bacterial pneumonias are also more severe in these people.
Pneumocystis pneumonia
Pneumocystis jirovecii is a fungus that infects only humans. Almost all of us acquire it in childhood without symptoms; it spreads through the air, including between patients in hospital. It causes pneumonia (formerly called "PCP", after its old name P. carinii) in people with very low defences:
- People with HIV with CD4 counts below 200 cells/µl (or below 14%), especially if they do not know they have the infection. It was the disease that raised the alarm about the AIDS epidemic in 1981.
- People without HIV: blood cancers, transplants, prolonged corticosteroid treatment (for example, the equivalent of 20 mg or more of prednisolone for 4 weeks or longer, especially with another immunosuppressant), rituximab, some chemotherapy drugs, severe autoimmune diseases.
In HIV, the pneumonia is subacute: weeks of dry cough, fever and breathlessness that worsens on exertion. In people without HIV it is usually more abrupt (days) and more severe, often when the corticosteroid dose is reduced. Desaturation on exertion with an almost normal examination is typical.
Cytomegalovirus
Cytomegalovirus (CMV) is a herpesvirus that infects most adults (in Spain more than 60-80%; in the UK about half to two thirds) and remains latent for life. In immunocompromised people it can reactivate or be acquired with a transplanted organ and cause disease in the lung (pneumonitis), gut, retina or liver. The risk is highest:
- In solid organ transplantation, especially when the donor is positive and the recipient negative (D+/R−), and in lung transplantation, in which CMV pneumonitis is especially common.
- In haematopoietic stem cell (bone marrow) transplantation, especially if the recipient is positive and in graft-versus-host disease.
- In HIV with very low CD4 counts (below 50/µl), in whom retinitis is more common than pneumonia.
CMV pneumonitis causes fever, dry cough, breathlessness and low oxygen levels, with diffuse shadowing on CT. Finding CMV in the blood (viraemia) or in bronchoalveolar lavage does not always mean the virus is causing the pneumonia: it must be interpreted in context.
Other opportunistic lung infections
- Invasive aspergillosis and other moulds (mucormycosis): mainly in prolonged neutropenia and bone marrow transplantation. See aspergillosis and other fungal lung infections.
- Cryptococcosis: nodules or pneumonia; it can spread to the meninges.
- Tuberculosis: reactivation with anti-TNF drugs, transplants or HIV, often with atypical presentations. See tuberculosis.
- Nontuberculous mycobacteria. See nontuberculous mycobacteria.
- Nocardia: nodules and cavities, sometimes with brain abscesses.
- Endemic fungi in people who have lived in or travelled to the Americas or Asia. See endemic fungal infections.
- Common respiratory viruses: influenza, RSV, SARS-CoV-2, parainfluenza, metapneumovirus, adenovirus. See influenza, COVID-19 and RSV.
- Strongyloides: a parasite that, with corticosteroids, can cause severe hyperinfection in people from tropical areas.
- Toxoplasma, Rhodococcus, Legionella (see Legionella and atypical pneumonias).
What is not infection
In these people, a new lung shadow may not be an infection: drug toxicity (chemotherapy, checkpoint inhibitors, sirolimus; see drug- and radiation-induced lung disease), alveolar haemorrhage, oedema, tumour relapse, organising pneumonia, transplant-specific syndromes or bronchiolitis obliterans (see bronchiolitis obliterans). There is often more than one cause at once.
In numbers
- Worldwide, more than 400,000 cases of Pneumocystis pneumonia are estimated to occur each year, with high mortality, according to global estimates of serious fungal disease (Denning, Lancet Infect Dis, 2024).
- In HIV, mortality from treated Pneumocystis pneumonia is around 10-20%; in people without HIV it is higher, 30-50% in many series, because the illness is more abrupt, is suspected later and patients have other serious diseases.
- In Spain, about 3,000 new HIV infections are diagnosed each year (Ministry of Health, 2022-2023 data), and almost half are diagnosed late, with CD4 counts below 350. Pneumocystis pneumonia remains one of the most common AIDS-defining illnesses, alongside tuberculosis.
- Without prevention, CMV infection affected a large share of high-risk transplant recipients in the first months; current prophylaxis or pre-emptive strategies have reduced it greatly.
- There are more and more immunocompromised people: cancer survivors, transplant recipients (Spain is a world leader in donation and transplantation, with more than 5,000 organ transplants a year according to its National Transplant Organisation) and people on biologic treatments.
Causes and risk factors
- Undiagnosed or untreated HIV infection (low CD4).
- Blood cancers and chemotherapy; bone marrow transplantation.
- Organ transplantation (lung, kidney, liver, heart) with its immunosuppressive treatment. See lung transplantation.
- High-dose corticosteroids for weeks (see oral and systemic corticosteroids).
- Immunosuppressants and biologics: methotrexate, mycophenolate, cyclophosphamide, rituximab, anti-TNF drugs, JAK inhibitors, among others.
- Congenital immunodeficiencies and asplenia.
- Additional factors: older age, malnutrition, diabetes, previous lung disease, hospital admission.
Symptoms
- Fever, sometimes the only symptom. In neutropenia, fever is an emergency.
- Cough, especially dry in Pneumocystis and CMV.
- Progressive breathlessness, especially on exertion; falling oxygen saturation when walking.
- Chest pain, haemoptysis (in aspergillosis and mucormycosis; see coughing up blood).
- General symptoms: tiredness, weight loss, sweats.
Symptoms may be few because inflammation is also reduced: severe pneumonia can start with a low fever and little cough.
Act immediately: if you are on chemotherapy, have had a transplant or take immunosuppressants and have a temperature of 38 °C or more, call your team or go to A&E the same day, as you have been instructed. Call 112 in Europe, or your local emergency number, if you have difficulty breathing, blue lips, confusion, severe dizziness or oxygen saturation below 92%.
Diagnosis
Diagnosis must be fast, because the outlook worsens with each day of delay, and is invasive more often than in other people.
Tests
- Pulse oximetry at rest and on exertion, and arterial blood gases.
- Early chest CT: more sensitive than an X-ray. In Pneumocystis and CMV, diffuse bilateral ground-glass opacity is typical (sometimes with cysts); in fungal infection, nodules with a halo sign; in bacterial infection, consolidation; in tuberculosis and Nocardia, cavities.
- Blood tests: full blood count, CD4 in HIV, LDH (usually raised in Pneumocystis), β-D-glucan (very sensitive for Pneumocystis: a negative result makes the diagnosis unlikely), galactomannan (Aspergillus), CMV viral load by PCR, cryptococcal antigen, blood cultures. See blood tests in respiratory diseases.
- Induced sputum with hypertonic saline to look for Pneumocystis (useful mainly in HIV).
- Bronchoscopy with bronchoalveolar lavage (BAL): the key test. It allows stains and immunofluorescence and PCR for Pneumocystis, PCR and culture for CMV and other viruses, galactomannan, and cultures for bacteria, fungi and mycobacteria. See sputum analysis, PCR and microbiology tests.
- Biopsy (transbronchial, CT-guided needle or surgical) when there is no diagnosis; histology is the most reliable test for CMV pneumonitis (cells with "owl's eye" inclusions).
Guide values
| Test | Value | Interpretation |
|---|---|---|
| CD4 in HIV | < 200/µl (or < 14%) | Risk of Pneumocystis: indication for prophylaxis |
| < 50/µl | Risk of CMV and atypical mycobacteria | |
| Serum β-D-glucan | Negative (below the laboratory cut-off, often < 80 pg/ml) | Makes Pneumocystis pneumonia very unlikely |
| PaO2 breathing air | < 70 mmHg (9.3 kPa), or alveolar-arterial gradient ≥ 35 mmHg | Moderate-severe Pneumocystis pneumonia in HIV: add corticosteroids |
| Quantitative Pneumocystis PCR in BAL | High load | Supports infection; low loads may be colonisation |
| Blood CMV viral load | Thresholds depend on the centre and type of transplant | Guides pre-emptive treatment; does not by itself confirm pneumonitis |
Treatment
Pneumocystis pneumonia
- High-dose co-trimoxazole (trimethoprim-sulfamethoxazole, 15-20 mg/kg/day of trimethoprim in 3-4 divided doses), oral or intravenous, for 21 days. Common side effects: rash, fever, low white cells and platelets, high potassium, kidney and liver changes.
- Corticosteroids (a 21-day tapering course of prednisolone, prednisone in the US) in people with HIV and PaO2 < 70 mmHg or gradient ≥ 35 mmHg: they reduce mortality. In people without HIV the benefit is uncertain and decided case by case.
- Alternatives if there is allergy or intolerance: primaquine with clindamycin, intravenous pentamidine, atovaquone (mild cases).
- In HIV, antiretroviral treatment is started within the first two weeks.
- Oxygen therapy, and in severe cases non-invasive or mechanical ventilation. See respiratory failure.
Cytomegalovirus
- Intravenous ganciclovir for severe disease, and oral valganciclovir for moderate cases or to complete treatment, until the viral load is undetectable (at least 2-3 weeks). It can lower white cells and platelets.
- Foscarnet or cidofovir if there is resistance or bone marrow toxicity (both damage the kidneys).
- Maribavir: an oral antiviral approved by the EMA in 2022 for refractory or resistant CMV infection after transplantation.
- Reducing immunosuppression where possible.
Other infections
- Aspergillosis and moulds: voriconazole, isavuconazole, posaconazole or liposomal amphotericin B.
- Bacteria: early broad-spectrum antibiotics, especially in neutropenic fever, started within the first hour. See antibiotics for respiratory infections.
- Influenza and COVID-19: early oseltamivir for influenza; antivirals (nirmatrelvir-ritonavir, remdesivir) in high-risk COVID-19, checking interactions with immunosuppressants. See antivirals and antibodies against respiratory viruses.
- Tuberculosis: standard treatment, watching for rifampicin interactions with immunosuppressants and antiretrovirals.
Outlook and complications
The outlook depends on the organism, the speed of diagnosis and, above all, the underlying disease and whether the immune system recovers. Pneumocystis pneumonia in HIV treated in time has a good outlook, and with antiretroviral treatment the person recovers their defences. In people without HIV, and in CMV pneumonitis after bone marrow transplantation, mortality remains high. Complications include respiratory failure, acute respiratory distress syndrome, pneumothorax (in Pneumocystis with cysts) and, in transplant recipients, the risk of organ rejection.
Prevention
Prophylaxis
| Situation | Usual prophylaxis |
|---|---|
| HIV with CD4 < 200/µl | Co-trimoxazole (one double-strength tablet daily or three times a week) until CD4 exceeds 200/µl for 3 months on antiretroviral treatment |
| Solid organ transplant | Co-trimoxazole for at least 6-12 months (longer after lung transplantation); valganciclovir or CMV viral load monitoring depending on D/R risk |
| Bone marrow transplant | Co-trimoxazole; letermovir to prevent CMV in positive recipients; antifungals according to risk |
| Corticosteroids ≥ 20 mg/day prednisolone for ≥ 4 weeks with another risk factor | Consider co-trimoxazole |
| Before anti-TNF and other biologics | Screening for latent tuberculosis (IGRA or Mantoux) and treating it. See tuberculosis tests |
| People from tropical areas before corticosteroids | Rule out or treat Strongyloides (ivermectin) |
If co-trimoxazole is not tolerated, alternatives exist (dapsone, atovaquone, nebulised pentamidine). Do not stop prophylaxis on your own.
Vaccines and general measures
- Recommended inactivated vaccines: annual flu, pneumococcal, COVID-19, RSV according to age and risk, recombinant shingles, hepatitis B. Live vaccines (MMR, chickenpox, yellow fever) are usually contraindicated during intense immunosuppression. See respiratory vaccines and vaccination to protect your lungs.
- Vaccinate household contacts (flu, COVID-19).
- Early HIV diagnosis: getting tested is the best way to avoid Pneumocystis pneumonia.
- Hand hygiene, masks during virus season and in hospital, avoiding contact with sick people.
- Avoid building sites, dust, compost and gardening without protection during the highest-risk phases (fungi).
- Food safety (avoid unpasteurised dairy and undercooked meat).
Living with immunosuppression
- Keep a written plan of what to do and whom to call if you have a fever.
- Carry a list of your medicines: many antimicrobials interact with immunosuppressants (tacrolimus, ciclosporin) and antiretrovirals.
- Ask before travelling, especially to tropical areas (see travelling with a respiratory condition).
- If you have pets, have someone else clean cages and litter trays.
- Do not smoke and avoid smoke.
Myths and facts
- "If my fever isn't high, it isn't serious." False: low defences dampen symptoms; severe pneumonia can give few signs.
- "Co-trimoxazole is just another antibiotic; I can stop it if I feel well." It is the prophylaxis that prevents Pneumocystis pneumonia; do not stop it without advice.
- "Vaccines don't work if I'm immunocompromised." They protect less, but they do protect; and vaccinating household contacts adds protection.
- "Pneumocystis only affects people with HIV." Today a large share of cases occur in people without HIV who have cancer, transplants or take corticosteroids.
Questions to ask your doctor
- What kind of immunosuppression do I have and which infections should I protect myself against?
- Do I need prophylaxis with co-trimoxazole or other medicines? For how long?
- Which vaccines should I have and which should I avoid?
- What should I do and whom should I call if I have a fever or cough?
- Do my treatments interact with antibiotics or antivirals?
Sources
- Maertens J, et al. ECIL guidelines for preventing Pneumocystis jirovecii pneumonia in patients with haematological malignancies and stem cell transplant recipients. J Antimicrob Chemother. 2016;71:2397-404.
- Fishman JA, Gans H; AST Infectious Diseases Community of Practice. Pneumocystis jiroveci in solid organ transplantation: guidelines from the American Society of Transplantation. Clin Transplant. 2019;33:e13587.
- Ljungman P, et al. Guidelines for the management of cytomegalovirus infection in patients with haematological malignancies and after stem cell transplantation from the 2017 European Conference on Infections in Leukaemia (ECIL 7). Lancet Infect Dis. 2019;19:e260-72.
- Kotton CN, et al. The Third International Consensus Guidelines on the Management of Cytomegalovirus in Solid-organ Transplantation. Transplantation. 2018;102:900-31.
- Fishman JA. Infection in organ transplantation. Am J Transplant. 2017;17:856-79.
- MedlinePlus. Pneumonia - weakened immune system.
Recent guidelines and documents (2022-2026)
- European AIDS Clinical Society (EACS). EACS Guidelines, version 13.0. October 2025. eacsociety.org
- Panel on Guidelines for the Prevention and Treatment of Opportunistic Infections in Adults and Adolescents With HIV. NIH, CDC, HIVMA/IDSA. 2024 update. clinicalinfo.hiv.gov
- Denning DW. Global incidence and mortality of severe fungal disease. Lancet Infect Dis. 2024;24:e428-38.
- Ministerio de Sanidad (Spain). Epidemiological surveillance of HIV and AIDS in Spain. 2023 update.
Sources reviewed and updated in November 2026.
History · Medicapedia
The history of this condition
How it was described, who studied it and how its treatment has changed over the centuries, on Medicapedia, our sister encyclopedia of the history of medicine.