Past studies have shown that coffee drinkers live longer than those who don’t down a daily cup of joe.

Weirdly enough, scientists weren’t sure why. But Stanford University researchers may have unveiled the reason: Regularly consuming caffeine—not necessarily in coffee—may help reduce levels of a protein linked to inflammation, according to a multi-part study.

The first part of the research checked blood samples from 100 people taking part in an ongoing Stanford study and discovered that some subjects older than 60 had high levels of IL-1-beta, an inflammatory protein that can accumulate as you age and is tied to greater risk for hardened arteries, high blood pressure, and early death. Researchers then started up a study focused on IL-1-beta, and discovered that mice with high amounts of it tended to have lots of inflammation and high blood pressure.

The researchers then went back to the study participants who had lower levels of IL-1-beta and found that they reported drinking more caffeinated beverages than those with elevated amounts of the damaging protein. In the last part of the experiment, researchers put their theory to the test by adding caffeine and inflammatory compounds to human immune cells in petri dishes. The result? The caffeine actually prevented the compounds from creating cell inflammation.

The 2015 Dietary Guidelines say that it’s cool to get around three to five cups of coffee (or about 400mg/d caffeine) a day, and that the brew is “is not associated with increased long-term health risks among healthy individuals. In fact, consistent evidence indicates that coffee consumption is associated with reduced risk of type 2 diabetes and cardiovascular disease in healthy adults.”

Make ours a double espresso, doc.