People with irregular heartbeats are often counseled to avoid caffeine to reduce their risk of heart arrhythmias even though scientific studies have not consistently demonstrated a connection between caffeine and an abnormal heart rate. Now, there’s good news for coffee-loving patients with atrial fibrillation and other arrhythmias: A new study found no evidence that moderate coffee consumption increases the risk of arrhythmias. In fact, coffee consumption actually seems to reduce the risk of an irregular heartbeat.

Coffee is the major source of caffeine for many people, and it has a reputation for causing arrhythmias or making them worse, Gregory Marcus, senior author of the study, told TheDoctor. But the study’s results suggest otherwise. “Given the potential health benefits of coffee, our study provides reassurance that prohibitions against caffeine to reduce arrhythmia risk are likely unwarranted,” he said.

It may be the adrenalin-like effect of caffeine that suppresses arrhythmias, or it may be coffee’s anti-inflammatory properties.

Using data collected over 12 years from almost 400,000 people participating in the UK Biobank, a large-scale biomedical database, researchers from the University of California, San Francisco (UCSF) analyzed the relationship between coffee consumption and heart arrhythmias. The study period also included a four-year follow-up.

Participants filled out surveys that included questions about coffee consumption and were grouped according to how many cups of coffee they drank per day. Each additional cup of coffee consumed was associated with a three percent lower risk of any kind of arrhythmia, including atrial fibrillation and premature ventricular contractions.

It is not yet clear exactly why this is, but there are a couple of theories that may explain the effect, said Marcus, a professor of medicine at UCSF. Many arrhythmias, particularly atrial fibrillation, seem to be triggered by increased activity of the vagus nerve, part of the parasympathetic nervous system that controls the heart rate when people are at rest. The adrenalin-like effect of caffeine may suppress those arrhythmias.

Or it's possible that since systemic inflammation is an important risk factor for arrhythmias, coffee’s anti-inflammatory properties may serve to reduce arrhythmia risk.

Coffee may have other long-term benefits, too — such as giving people the energy to be more physically active, and reducing their risk of diabetes. Both physical activity and better control of blood sugar levels can help reduce arrhythmia risk over the long term.

The study and a related editorial are published in JAMA Internal Medicine.