Bacterial pneumonia is an infection where bacteria multiply in your lungs' air sacs, filling them with fluid or pus
When you breathe, air travels down your windpipe into your lungs, where it reaches millions of tiny air sacs called alveoli. Normally these sacs fill with air and oxygen moves into your blood. In bacterial pneumonia, bacteria settle in these air sacs and trigger an immune response. Your body floods the sacs with fluid and white blood cells to fight the infection, which means less room for air and oxygen. This is why bacterial pneumonia causes you to feel short of breath and why a chest X-ray shows cloudy patches where the infection is.
Bacterial pneumonia differs from viral pneumonia because bacteria respond to antibiotics while viruses do not. A doctor can often tell the difference by looking at your symptoms, how fast they came on, and what your chest X-ray shows, though sometimes a sputum culture (a sample of mucus you cough up) is needed to identify which bacteria is causing it.
Key Takeaways
- Bacterial pneumonia happens when bacteria multiply in your lung's air sacs, filling them with fluid that blocks oxygen from reaching your blood.
- Common bacteria that cause pneumonia include Streptococcus pneumoniae, Haemophilus influenzae, and Legionella, each with slightly different patterns of spread and severity.
- Symptoms typically develop over hours to a few days and include cough, fever, chest pain, and shortness of breath.
- Bacterial pneumonia is treated with antibiotics, and which antibiotic your doctor chooses depends on which bacteria is suspected or confirmed.
How bacteria enter and colonize the lungs
You breathe in bacteria constantly—they float in the air around you. Most of the time your lungs' natural defenses stop them: tiny hairs called cilia sweep mucus and trapped particles up and out, and your immune cells patrol the airways. Bacterial pneumonia develops when bacteria either overwhelm these defenses or when your defenses are already weakened.
Bacteria can reach your lungs in two main ways. The most common is aspiration: you inhale bacteria-laden droplets or secretions from your own mouth and throat, usually while sleeping or if your swallowing reflex is impaired. The second is inhalation of bacteria suspended in air—this is how Legionella spreads through contaminated water systems, or how Mycobacterium tuberculosis spreads through coughs. Once bacteria land in the air sacs, they begin to multiply if conditions favor them.
The three main bacteria that cause community pneumonia
Streptococcus pneumoniae is the most common bacterial cause of pneumonia in adults. It normally lives harmlessly in your throat but can slip into the lungs, especially after a viral infection like the flu has already damaged your airway lining. It causes a sudden onset of fever, cough, and chest pain, and typically shows up on chest X-ray as a dense patch in one lobe.
Haemophilus influenzae (type b, though other types exist) is more common in people with chronic lung disease like COPD. It often causes a more gradual illness and can spread to the bloodstream. Legionella pneumophila is less common but more severe—it grows in warm water systems like air conditioners and hot tubs, and causes high fever, confusion, and sometimes kidney or liver problems alongside the lung infection.
Other bacteria including Staphylococcus aureus, Klebsiella pneumoniae, and Pseudomonas aeruginosa cause pneumonia mainly in hospitalized patients or people with severe underlying illness. The bacteria involved matters because different ones respond to different antibiotics and carry different risks of complications.
Why some people develop bacterial pneumonia and others do not
Your risk of developing bacterial pneumonia depends partly on your immune system's strength and partly on your exposure. People over 65, those with diabetes, heart disease, or chronic lung disease, and those taking immunosuppressant medications are at higher risk. Smoking damages the cilia that sweep bacteria out, so smokers develop pneumonia more often. Recent viral infections like influenza or COVID-19 damage the airway lining and make bacterial infection more likely.
Hospitalization itself is a risk factor—ventilators bypass your natural airway defenses, and hospital environments contain bacteria that have adapted to survive antibiotics. Alcohol use disorder impairs immune function and increases aspiration risk. Even something as simple as being bedridden or sedated increases the chance that bacteria you inhale will settle and multiply rather than being cleared.
Symptoms that develop over hours to days
Bacterial pneumonia typically comes on faster than viral pneumonia. You may feel fine one day and wake up with fever, chills, and a cough the next. The cough often starts dry but progresses to produce sputum—mucus that may be clear, yellow, green, or tinged with blood. You may feel sharp chest pain when you breathe deeply or cough, because the infection inflames the lining around your lungs.
Shortness of breath is common, especially if the infection is widespread or if you already have lung disease. Some people develop confusion or altered mental status, particularly if they are older or if the infection enters the bloodstream. Nausea, vomiting, and diarrhea can occur but are less typical than with viral pneumonia. The severity of symptoms does not always match the extent of infection—some people with large areas of pneumonia on X-ray feel only mildly ill, while others with smaller infections feel very sick.
How doctors identify bacterial pneumonia
A doctor starts by listening to your lungs with a stethoscope—bacterial pneumonia often produces crackling sounds called crackles or consolidation sounds where fluid fills the air sacs. A chest X-ray shows where the infection is and how much of your lungs are involved. Blood tests can show signs of infection like elevated white blood cells, though these are not specific to bacterial pneumonia.
To identify which bacteria is causing the infection, doctors may order a sputum culture—you cough into a container and the sample is grown in a lab to see which bacteria grows and which antibiotics kill it. This takes several days, so doctors usually start antibiotics before results come back, based on which bacteria are most common in your community and your risk factors. A blood culture may be done if the infection appears severe, to check whether bacteria have entered the bloodstream.
Treatment with antibiotics and supportive care
Bacterial pneumonia is treated with antibiotics chosen based on the suspected bacteria and local resistance patterns. For community-acquired pneumonia in otherwise healthy adults, doctors often start with amoxicillin-clavulanate or a fluoroquinolone like levofloxacin. If you are hospitalized or have risk factors for resistant bacteria, broader-spectrum antibiotics may be used initially. Once culture results return, the antibiotic may be narrowed to target the specific bacteria.
Beyond antibiotics, treatment focuses on supporting your body while it recovers. This means rest, fluids to prevent dehydration, and oxygen if your blood oxygen level drops. Pain relievers can ease chest pain and fever. Most people with bacterial pneumonia improve within a week of starting the right antibiotic, though fatigue and a lingering cough can persist for weeks. Hospitalization is needed if you have severe pneumonia, low oxygen levels, confusion, or underlying conditions that make recovery riskier.
Frequently Asked Questions
Can you catch bacterial pneumonia from another person?
You can catch the bacteria that cause pneumonia from another person through respiratory droplets, but most people who are exposed do not develop pneumonia—their immune system clears the bacteria. Pneumonia develops when bacteria overwhelm your defenses, which is more likely if you are older, have chronic illness, or your immune system is weakened.
Is bacterial pneumonia worse than viral pneumonia?
Bacterial pneumonia often comes on faster and can be more severe, but severity depends on which bacteria, how much of your lungs are infected, and your overall health. The key difference is that bacterial pneumonia responds to antibiotics while viral pneumonia does not, making bacterial pneumonia more treatable once identified.
How long does it take to recover from bacterial pneumonia?
Most people feel significantly better within a week of starting the correct antibiotic. However, complete recovery—including return to normal energy and clearing of the cough—can take two to four weeks or longer, especially in older adults or those with underlying lung disease.
What happens if bacterial pneumonia is not treated?
Untreated bacterial pneumonia can spread to the bloodstream, causing sepsis, or damage lung tissue permanently. It can also lead to complications like fluid around the lungs or a collapsed lung. This is why seeking care when you have fever, cough, and chest pain is important.
Can you get bacterial pneumonia more than once?
Yes, recovering from bacterial pneumonia does not provide lasting immunity. You can develop pneumonia again from the same bacteria or a different one. People with chronic lung disease or weakened immune systems are at higher risk of recurrent pneumonia.