Pneumocystis pneumonia (PCP) is a lung infection that mainly affects people with weakened immune systems. The fungus Pneumocystis jirovecii causes it. Providers treat it with antibiotics or antifungal medications. See a healthcare provider right away if you think you have Pneumocystis pneumonia. It can be fatal if left untreated.
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
Pneumocystis pneumonia (PCP or PJP) is a lung infection you get from the fungus Pneumocystis jirovecii. It almost exclusively affects people with weakened (compromised) immune systems, including people who have:
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
If you think you have Pneumocystis pneumonia and have a compromised immune system, seek immediate medical attention. PCP can be fatal if left untreated.
Pneumocystis jirovecii pneumonia used to be called Pneumocystis carinii pneumonia, which is why it’s abbreviated PCP. While it can cause serious illness in people with compromised immune systems, it’s rare in people with healthy immune systems.
Symptoms of Pneumocystis pneumonia include:
In most people, symptoms come on quickly, over only a few days. In people with HIV, symptoms can come on slowly, over a few weeks.
The fungus Pneumocystis jirovecii (P. jirovecii) causes PCP. Studies suggest that — unlike many types of fungi — P. jirovecii only lives in humans, rather than in the environment around us.
You get Pneumocystis pneumonia from other people. P. jirovecii is transmitted from one person to another through the air when someone coughs, sneezes or talks. Most of us are exposed to P. jirovecii in our lives — usually before age 4 — but don’t have symptoms or have mild symptoms. You can spread PCP to people who have compromised immune systems, even if you have no symptoms.
Advertisement
Most people who get PCP have a weakened immune system. Specifically, it most commonly affects people who have issues with T cell function. T cells are a specialized part of your immune system that help you recognize and fight infections.
Health conditions that put you at a higher risk for PCP include:
About 30-40% of PCP cases are in people with HIV. It’s one of the most common AIDS-defining illnesses. Your risk is higher if you don’t take medications to manage HIV (antiretroviral therapy).
A healthcare provider will diagnose PCP by looking for signs of P. jirovecii in your mucus or fluids from your lungs. To get a sample to test, they might use:
Your provider can also use a chest X-ray or CT scan to take pictures of your lungs and look for signs of pneumonia.
Healthcare providers treat Pneumocystis pneumonia with high doses of the antibiotic trimethoprim-sulfamethoxazole (TMP-SMX). Antibiotics are effective in treating certain fungal infections. Other treatments include:
You might need a ventilator to help you breathe. If your lungs are working but you’re not getting enough oxygen, your provider might give you extra oxygen through a tube in your nose or mask on your face. Your provider may also give you corticosteroids to decrease inflammation in your lungs.
If you have HIV or another condition that weakens your immune system, talk to your provider about preventing infections. See a provider right away if you have a weakened immune system and you have symptoms of PCP or any other infection.
Go to the emergency room if you have symptoms of a severe illness, including:
If you have a weakened immune system, ask your provider if you should go to the ER sooner than what’s listed here. You may need emergency care right away or with less severe symptoms.
Pneumocystis pneumonia can be cured with medication, but you need to start treatment as soon as possible. Because only people with weakened immune systems get sick with PCP, it can quickly make you seriously ill. Your provider may start treatment before all of your test results come back. Pneumocystis pneumonia is almost always fatal if left untreated.
Advertisement
How long it takes to recover from PCP depends on how severe your case is. You may need to be treated in the hospital. You’ll need to take medication for three weeks, but it may take longer to feel completely better.
It’s hard for experts to estimate a Pneumocystis pneumonia survival rate. In general, mortality rates for PCP are higher in people with compromised immune systems who don’t have HIV than those with HIV.
Since most people don’t have symptoms of a Pneumocystis infection, it can be hard to avoid being exposed. Having good handwashing habits, avoiding other people when you’re sick, and covering your mouth and nose when you cough or sneeze can help prevent the spread of infectious diseases.
If you smoke, your provider will recommend that you quit. Smoking can increase the risk of Pneumocystis infection and make it more likely you’ll get severely sick.
Your healthcare provider might prescribe medication to help prevent a Pneumocystis infection if you:
Advertisement
Providers prescribe the same medications to both prevent and treat PCP.
Anyone can get the most common kinds of pneumonia from viruses, bacteria and fungi. But only the fungus Pneumocystis jirovecii can cause Pneumocystis pneumonia. Most people who get Pneumocystis pneumonia have compromised immune systems.
Most of us will encounter Pneumocystis jirovecii in our lives and never even know it. But if you have a compromised immune system, it can make you seriously ill. Fortunately, if you’re diagnosed and treated early, you can make a full recovery.
If you have a weakened immune system — or a condition that puts you at risk for one — don’t ignore symptoms of infections. Talk to your provider about prevention strategies and don’t be afraid to ask questions about managing your condition. You can work together to make a plan that will keep you healthy.
Advertisement
Have a virus, fungus or bacteria? Some of these “bugs” won’t go away on their own. Cleveland Clinic’s infectious disease experts are here to help.
Last reviewed on 08/12/2025.
Learn more about the Health Library and our editorial process.