Got heart-rhythm problems? Consider a cup of coffee.

• Coffee does not increase the risk of arrhythmias, according to a new study.

• Doctors are now rethinking how caffeine affects people with heart-rhythm problems.

• Every additional cup of coffee might actually decrease the risk of arrhythmias by 3%.

Coffee: It wakes you up and it’s good for the heart. Wait, what?

Despite warnings from doctors that people suffering from heart rhythm problems should avoid coffee (and more specifically, caffeine) — as it can speed up your heartbeat — new research has quashed fears that an extra cup of coffee or two can be harmful.

It may actually be good for you.

Can coffee help your heart?

Researchers from the University of California-San Francisco found that most people can sip a coffee or diet soda later in the day, as caffeine doesn’t have an impact on increasing the risk of arrhythmias, a disorder that can change heart rate or heart rhythm.

The study, published in JAMA Internal Medicine, silences decades of doubt relating to caffeine and heart health.

“We see no evidence for this broad-based recommendation to avoid coffee or caffeine,” study co-author Dr. Gregory Marcus, associate chief of cardiology for research at the University of California, San Francisco, said. “There could be some individuals where caffeine is their trigger, but I think the growing evidence is those cases are actually quite rare.”

How caffeine can help your heart

The link between caffeine and arrhythmias has been debunked before. Previous research has discovered that drinking a couple of cups of coffee daily does not lead to a greater risk of arrhythmias, and even for patients with abnormal heart rhythm, caffeinated beverages can be considered safe.

However, there hasn’t been enough research claiming that coffee can actually help reduce the risk of arrhythmias. This study, which featured more than 386,000 people over a three-year period, aimed to do that.

According to the report, every additional cup of coffee that a person drinks daily might lower their risk of arrhythmia by 3% on average.

“The majority of people, even those with arrhythmias, should be able to enjoy their cup of coffee, and maybe there are some people for whom caffeine or coffee may actually help reduce their risk,” Marcus said.

Despite the promising findings, researchers noted that caffeine’s potential to protect is so small, making it not exactly a sure thing as a protective measure. The group called for additional research.

“I think the bottom line, based on these findings, is that coffee may not cause arrhythmias, but it doesn’t necessarily protect against them either,” Dr. Zachary Goldberger, an associate professor at the University of Wisconsin-Madison, said.

Since coffee has anti-inflammatory properties — a recent study suggested that those properties can protect you against COVID-19 — researchers hinted that it can help battle the inflammation that causes heart rhythm problems.

Additionally, caffeine and coffee can have a number of other health benefits, like preventing liver cancer, reducing the risk of heart attack, and even Parkinson’s disease.