Locations:

Opportunistic Infection

Opportunistic infections are when germs cause an infection in people with weakened immune systems. There are many different causes of opportunistic infections, including consuming contaminated foods and beverages or coming into contact with the bodily fluids of an infected person. Medications can help prevent and treat opportunistic infections.

What Is an Opportunistic Infection?

An opportunistic infection happens when pathogens (germs) affect people whose immune systems aren’t working as well as they should (immunocompromised). If your immune system was healthy, the infection would be mild, or you wouldn’t have one at all. Examples of opportunistic pathogens include:

Advertisement

Cleveland Clinic is a non-profit academic medical center. Advertising on our site helps support our mission. We do not endorse non-Cleveland Clinic products or services. Policy

You may have a weakened immune system for many reasons. Some conditions you have at birth (congenital conditions) may affect your immune system. But medications/therapies or conditions you get later in life can also harm it.

Opportunistic infections (OIs) are serious and even life-threatening. If you have a compromised immune system and show symptoms of an OI, don’t wait — get in touch with a healthcare provider.

What is an example of an opportunistic infection?

Common examples of opportunistic infections include:

Bacterial infections

Fungal infections

Parasitic infections

Viral infections

Symptoms and Causes

What are the symptoms of opportunistic infections?

There is a wide range of opportunistic infections, so symptoms vary. But some of the most common opportunistic infection symptoms include:

How does a person get an opportunistic disease?

There are many ways in which you can come across germs that cause opportunistic infections. You might inhale germs from the air around you, or eat or drink a contaminated food or drink. Some of the most common sources of opportunistic germs include:

Advertisement

  • Drinking unpasteurized juices or dairy
  • Drinking untreated water
  • Eating unwashed fruits and vegetables
  • Eating undercooked eggs and meat
  • Encountering animal poop (feces)
  • Encountering the bodily fluids (blood, pee, saliva) of an infected person

Risk factors

You’re at greater risk of an opportunistic infection if you:

Diagnosis and Tests

How doctors diagnose opportunistic infections

A healthcare provider will ask about your symptoms and medical history, then do a physical exam. To help confirm their diagnosis, they may recommend testing. These tests may include:

Management and Treatment

How do you treat opportunistic infections?

It depends on the type of infection you have. Possible treatments include:

Even after you feel better, a healthcare provider may recommend staying on the same medicine or taking something else to keep the infection from coming back (prophylaxis).

When should I see my healthcare provider?

Contact a healthcare provider right away if you have a compromised immune system and develop symptoms of an infection. Let them know:

  • About any animal exposure, including animal poop
  • About any recent bug bites or stings
  • If you ate or drank anything that may have been contaminated
  • Of any recent travels

You may also wish to ask a provider questions to help understand your condition and learn how to get and stay healthy. These may include:

  • What type of opportunistic infection do I have?
  • What treatment do you recommend?
  • How long will it take to feel better?
  • What should I do if my symptoms don’t get better?
  • What new symptoms should I be aware of?
  • What can I do to protect myself from future infections?
  • How often should I schedule follow-up appointments?
  • How do I prevent spreading an infection to someone with a compromised immune system?

Advertisement

Outlook / Prognosis

What can I expect if I have an opportunistic infection?

Opportunistic infections are serious and can be hard to treat. But healthcare providers can help you stay healthy with regular checkups and preventive care.

Prevention

Can opportunistic infections be prevented?

The following tips can help you prevent OIs:

  • Prevent infections
  • Food and water safety
  • General wellness
  • Reduce risks

Prevent infections

  • Avoid bodily fluids
  • Avoid others who are sick
  • Regularly wash your hands, especially after using the bathroom and encountering animals
  • Wear a mask in crowded areas

Food and water safety

  • Don’t consume undercooked eggs or meat, raw seed sprouts and unpasteurized dairy products and juices
  • Drink bottled water or boil water before drinking it in areas where the water supply may not be safe
  • Eat healthy food every day
  • Thoroughly wash fruits and veggies before you eat them

General wellness

  • Get regular physical activity
  • Schedule regular visits with a healthcare provider
  • Talk to a provider about what medications and vaccines they recommend to help keep you healthy
  • Talk to a provider about whether you should take vitamins

Reduce risks

  • Manage anxiety and stress
  • Use condoms every time you have sexual intercourse
  • Never share needles, syringes or other equipment that can inject drugs
  • Wear long sleeves and pants, and use bug spray to protect yourself from insect bites

Additional Common Questions

Is pneumonia an opportunistic infection?

Healthcare providers don’t usually consider pneumonia an opportunistic infection because anyone can get it. Many kinds of bacteria and viruses can cause pneumonia. But certain fungi — like Cryptococcus, Pneumocystis jirovecii and Coccidioides — are more likely to cause pneumonia in people with compromised immune systems. Healthcare providers consider pneumonia from these causes to be opportunistic infections.

Advertisement

A note from Cleveland Clinic

Having a compromised immune system can be challenging in many ways. There’s a lot of stress and uncertainty about your health. It’s easy to feel overwhelmed by the precautions you must take to prevent opportunistic infections. And you might worry whether your body can manage one. But many people with compromised immune systems work and have active social lives. Healthcare providers will work with you to lower your risk of an opportunistic infection and help you educate yourself and others on how to keep yourself safe.

Advertisement

Care at Cleveland Clinic

Cleveland Clinic’s primary care providers offer lifelong medical care. From sinus infections and high blood pressure to preventive screening, we’re here for you.

Medically Reviewed

Last reviewed on 07/10/2025.

Learn more about the Health Library and our editorial process.

Ad
Appointments 216.444.6503