3 Major Causes of Pneumonia: Bacteria, Viruses, Fungi

The three major causes of pneumonia are bacteria, viruses, and fungi. Bacteria and viruses account for the vast majority of cases, while fungal pneumonia is less common and typically affects people in specific regions or with weakened immune systems. Each type produces a similar result: the tiny air sacs in your lungs fill with fluid and pus, making it harder to breathe. But the way each infection develops, who it hits hardest, and how it’s treated differ significantly.

How Pneumonia Develops in Your Lungs

Regardless of the cause, pneumonia follows a similar chain of events inside your body. When a pathogen reaches the small air sacs deep in your lungs, it triggers a rapid immune response. Your body sends infection-fighting cells rushing to the site within three to four hours. Those immune cells, along with fluid that leaks from nearby blood vessels, flood the air sacs to try to contain the invader.

This flooding is what causes pneumonia symptoms. The fluid filling your air sacs is why you feel short of breath, and the intense immune activity is what drives fever and fatigue. In mild cases, your body clears the infection and reabsorbs the fluid. In severe cases, the inflammation itself can damage lung tissue, and the infection can spread to the bloodstream.

Bacterial Pneumonia

Bacteria are the most common cause of pneumonia serious enough to require medical care. The CDC lists two bacterial infections as the most frequent causes of community-acquired pneumonia (meaning infections picked up outside a hospital): pneumococcal disease and Mycoplasma pneumoniae infection. Pneumococcal bacteria alone account for 10% to 30% of adult community-acquired pneumonia cases.

Bacterial pneumonia tends to come on quickly. You might feel fine in the morning and have a high fever, productive cough with yellow or green mucus, and sharp chest pain by evening. The illness often follows another respiratory infection like a cold or the flu, which weakens your airway defenses enough for bacteria already present in your throat to move deeper into your lungs.

Mycoplasma pneumoniae deserves special mention because it behaves differently from other bacterial causes. It damages the lining of the respiratory tract more gradually, and the symptoms are often mild enough that people continue their daily routines. This is why it earned the nickname “walking pneumonia.” For children, Mycoplasma is the most common bacterial cause of pneumonia. For adults, it’s the second most common. Other less frequent bacterial causes include Legionella (which causes Legionnaires’ disease), Chlamydia pneumoniae, and Haemophilus influenzae.

Viral Pneumonia

Viruses are the other leading cause of pneumonia and are especially common in young children and older adults. The list of viruses that frequently cause pneumonia is long: influenza, RSV (respiratory syncytial virus), COVID-19, human metapneumovirus, parainfluenza virus, and rhinovirus all make the CDC’s common causes list. Less frequently, adenovirus, chickenpox, and measles can cause pneumonia too.

Viral pneumonia often starts more gradually than the bacterial form. You’ll typically have several days of upper respiratory symptoms, like a runny nose, sore throat, and dry cough, before the infection moves into the lungs. Fever tends to be lower than in bacterial pneumonia, and the cough is more often dry rather than producing thick mucus.

Among hospitalized elderly patients, RSV stands out as particularly dangerous. One study found that 65.6% of hospitalized older adults with RSV developed pneumonia, a strikingly high rate. RSV patients were also more likely to experience significant shortness of breath compared to those with influenza or COVID-19. Influenza, meanwhile, was more likely to cause high fevers. These differences can help doctors narrow down the cause, but testing is usually needed to confirm.

Viral pneumonia matters for another reason: it often opens the door to bacterial pneumonia. The virus damages the airway lining, strips away protective mucus, and suppresses local immune defenses, creating the perfect conditions for bacteria to invade. This “secondary bacterial pneumonia” is a major reason why flu seasons bring spikes in pneumonia hospitalizations.

Fungal Pneumonia

Fungal pneumonia is less common overall but plays a significant role in certain geographic areas and populations. Three types of fungal pneumonia are recognized as community-acquired infections in the United States, each tied to a specific region:

  • Valley fever (coccidioidomycosis): caused by a fungus in the soil of the southwestern U.S., particularly Arizona and California’s Central Valley.
  • Histoplasmosis: caused by a fungus found in soil contaminated with bird and bat droppings, concentrated in the Ohio and Mississippi River valleys.
  • Blastomycosis: caused by a soil fungus found in the Great Lakes region, Ohio and Mississippi River valleys, and parts of the Southeast.

Most people who breathe in these fungi never get sick or develop only mild symptoms that resolve on their own. Serious fungal pneumonia is more likely in people with weakened immune systems, including those undergoing chemotherapy, taking immunosuppressive medications, or living with HIV. In these populations, a fungus called Pneumocystis can also cause a severe form of pneumonia that was rare before the HIV epidemic.

Fungal pneumonia is frequently misdiagnosed as bacterial pneumonia because the symptoms overlap. If you live in or have recently traveled to an endemic area and your pneumonia isn’t improving with standard antibiotics, a fungal cause is worth considering.

Aspiration: A Different Path to Pneumonia

While bacteria, viruses, and fungi are the three pathogen-based causes, there’s a fourth mechanism worth understanding: aspiration pneumonia. This happens when food, liquid, saliva, or stomach contents are accidentally inhaled into the lungs, bringing bacteria from the mouth or stomach along with them.

Aspiration pneumonia is especially common in older adults. Research shows that 71% of elderly patients with pneumonia develop silent aspiration while sleeping, meaning material enters the lungs without triggering a cough reflex. The main culprit is oral bacteria that travel into the lungs during these silent aspiration events. Combined with standard pneumonia, aspiration pneumonia ranks as the third leading cause of death in some analyses. Risk rises with swallowing difficulties, reduced consciousness, and poor oral hygiene.

How Doctors Identify the Cause

Figuring out which type of pneumonia you have matters because the treatments are completely different. Antibiotics work against bacteria but do nothing for viruses or fungi. Antiviral medications target specific viruses. Antifungal drugs are needed for fungal infections. Using the wrong treatment wastes time and lets the real infection progress.

A chest X-ray or CT scan is typically the first step, revealing areas of the lungs filled with fluid. Blood tests help determine whether the infection is bacterial or viral. A sputum test, where you cough up mucus into a container for lab analysis, can identify the specific organism. In more severe cases, doctors may measure your blood oxygen levels with a sensor on your finger or take a sample of fluid from around the lungs.

Patterns in the imaging can offer clues. Bacterial pneumonia often shows up as a dense white area concentrated in one section of the lung. Viral pneumonia tends to appear as hazier, more diffuse patches spread across both lungs. But these patterns aren’t reliable enough on their own, which is why lab tests remain essential for guiding treatment.