HIV and Opportunistic Infections, Coinfections, and Conditions

What is an Opportunistic Infection?

Last Reviewed: March 31, 2025

Key Points

  • Opportunistic infections (OIs) are infections that occur more often or are more severe in people with weakened immune systems, such as people with HIV, than in people with healthy immune systems.
  • Since HIV medicines prevent HIV from damaging the immune system, the best protection against OIs for people with HIV is to take their HIV medicines exactly as prescribed.

 

Word cloud containing the names of various opportunistic infections.

What is an opportunistic infection?

Opportunistic infections (OIs) are infections that occur more often or are more severe in people with weakened immune systems than in people with healthy immune systems. People with weakened immune systems include people with HIV or cancer, or those who receive organ transplants.

OIs are caused by a variety of germs (viruses, bacteria, fungi, and parasites) that can be spread in many ways, like through the air, body fluids, or contaminated food or water.

Some OIs that people with HIV may get include candidiasis, Salmonella infection, toxoplasmosis, and tuberculosis (TB). In some cases, people may already have an inactive disease (such as latent tuberculosis) that becomes active as their immune system gets weaker, due to untreated conditions like HIV.

The Guidelines for the Prevention and Treatment of Opportunistic Infections in Adults and Adolescents With HIV provide detailed information on HIV-related OIs.

Why do people with HIV get OIs?

Once a person has HIV, the virus begins to multiply and damage the immune system. A weakened immune system makes it harder for the body to fight off OIs, which take advantage of a person’s weakened immune defenses.

HIV medicines prevent HIV from damaging the immune system. But without treatment with HIV medicines, HIV can gradually destroy the immune system and progress to acquired immunodeficiency syndrome (AIDS). Many OIs (such as certain forms of pneumonia and TB) and some cancers are considered AIDS-defining conditions, which are life-threatening in people with HIV.

Are OIs common in people with HIV?

Because HIV medicines are widely used in the United States, OIs have become less common among people with HIV than in previous years. However, OIs are still a problem for many people with HIV. Some people with HIV get OIs for the following reasons:

  • They may not know that they have HIV. Therefore, they are not getting HIV treatment. An OI may be the first sign that they have HIV.
  • They may know that they have HIV, but they are not getting HIV treatment.
  • They may be getting HIV treatment, but the HIV medicines are not controlling their HIV.

For people with HIV, the best protection against OIs is to take HIV medicines exactly as prescribed and to attend follow-up appointments regularly to make sure an HIV treatment regimen is working effectively.

What can people with HIV do to prevent getting an OI?

In addition to taking HIV medicines exactly as prescribed, people with HIV can take the following steps to reduce their risk of getting an OI.

Avoid Contact With the Germs That Cause OIs

The germs that can cause OIs can spread in a variety of ways, including in body fluids or in feces. To avoid sexually transmitted infections (STIs), use condoms every time you have sex. If you inject drugs, do not share drug injection equipment. After any contact with human or animal feces, wash your hands thoroughly with warm, soapy water.

Ask your health care provider about other ways to avoid the germs that can cause OIs.

Be Careful About What You Eat and Drink

Food and water can be contaminated with OI-causing germs. To be safe, do not eat certain foods (including undercooked eggs, unpasteurized dairy products or fruit juices, or raw seed sprouts) and do not drink water directly from a lake or river.

For more tips on how to avoid OI-causing germs, read the HIVinfo HIV and Nutrition and Food Safety fact sheet.

Travel Safely

Before you travel, talk to your health care provider about your travel plans to learn about ways you can avoid getting sick. Your health care provider might recommend that you get vaccinated or take certain medicines to prevent OIs that are common in the country you are going to visit. For instance, if a person with HIV is traveling to an area with high rates of malaria (such as Brazil or India), they may be advised to take mefloquine or another antimalarial medicine before traveling.

Read the Centers for Disease Control and Prevention (CDC) fact sheet on Living With HIV.

Get Vaccinated

Talk to your health care provider about which vaccines you need. To learn more, read the HIVinfo fact sheet on HIV and Immunizations.

Can OIs be treated?

There are many medicines to treat OIs, including antiviralantibioticantifungal, and antiparasitic drugs. The type of medicine used depends on the type of germ that caused the OI.

Some HIV medicines and conditions like diabetes or kidney disease may impact how effective the OI medicine is. Likewise, some OI medicines may impact how effective the HIV medicine is. When prescribing OI medicines, health care providers consider these and other factors to avoid unwanted drug interactions. Generally, OI drugs are more effective in people who stick to their HIV regimen (and therefore have control of their HIV) than those who are untreated or have advanced HIV.

Once an OI is successfully treated, a person may need to continue using the same medicine or switch to another medicine to prevent the OI from coming back.

The Clinicalinfo Drug Database includes information on many of the medicines used to prevent and treat OIs.


This fact sheet is based on information from the following sources:

From CDC:

From MedlinePlus:

From the HIV Clinical Practice Guidelines at Clinicalinfo.HIV.gov:

  • Guidelines for the Prevention and Treatment of Opportunistic Infections in Adults and Adolescents With HIV:

From the U.S. Department of Veterans Affairs:

Also see the HIV Source collection of HIV links and resources.