Opportunistic infection
An infection caused by a germ that rarely harms healthy people but can cause serious illness in someone with a weakened immune system.
An opportunistic infection is an infection that takes its chance when your body's defences are down. The germ may rarely harm a healthy person, but it can make someone with a weakened immune system seriously unwell.
Why it happens
Your immune system normally keeps many germs in check. A weakened immune system gives them an opening. This can happen with an illness such as untreated HIV, which the NHS says can lead to serious illnesses such as tuberculosis or pneumonia. It can also happen with some treatments, such as chemotherapy. You may see the word immunocompromised used for this.
In the lungs, the germ can be a bacterium, a virus or a fungus. The NHS says fungal lung infections are rare in healthy people in the UK. Examples that can affect people with weakened immunity include pneumocystis pneumonia and nontuberculous mycobacteria.
When to get help
If you have a weakened immune system and you feel unwell, do not wait. The NHS advises an urgent GP appointment or NHS 111 if you get cold symptoms and have a weakened immune system, or if you are shorter of breath than usual.
Call 999 if you are struggling to breathe, your lips or skin look pale, blue or grey, you cough up blood, or you suddenly become confused.
How I can help
If you have a weakened immune system and a chest infection or a cough that will not clear, I can arrange tests at your chosen hospital and explain what they show. I will work with the other doctors involved in your care.
Medically reviewed by Dr Sunil Patel, Consultant in Respiratory, General and Intensive Care Medicine. Last reviewed 19 October 2026.
Sources
- HIV and AIDSNHS, 2025
- PneumoniaNHS, 2026
- Respiratory syncytial virus (RSV)NHS, 2024
Related terms
Immunocompromised
Having a weakened immune system, for example because of HIV, chemotherapy, a transplant or certain medicines. This makes infections more likely and sometimes more serious.
Immunosuppressants
Medicines that calm an overactive immune system. They are used for conditions such as sarcoidosis, vasculitis and some types of lung scarring, and after transplants.
Pneumocystis pneumonia (PCP)
A fungal lung infection that mainly affects people with weakened immune systems, such as those with HIV or on strong immunosuppressive medicines.
Pneumonia
An infection that inflames the air sacs in one or both lungs, which may fill with fluid. It causes cough, fever and breathlessness, and can be serious.
Tuberculosis (TB)
A bacterial infection that mainly affects the lungs, causing a persistent cough, fever, night sweats and weight loss. It is curable with a long course of antibiotics.
Nontuberculous Mycobacteria (NTM)
Germs related to tuberculosis that are found in soil and water. They are not passed from person to person but can cause slow lung infections, particularly in people with bronchiectasis or COPD.
Aspergillus
A common mould found in soil and decaying plants. It is usually harmless but can cause allergic reactions or infection in some people with lung conditions or weak immunity.
Find out more
This information is for general guidance only and is not a substitute for medical advice. If you are worried about your symptoms, please speak to your GP or specialist. If you have severe breathlessness, chest pain, blue lips or are coughing up large amounts of blood, call 999 or go to A&E.