Coffee lovers, rejoice. There's more evidence that your morning mug won't harm your heart, according to a new study from Sweden.

In the study, researchers found that drinking coffee was not associated with an increased risk of a condition called atrial fibrillation, which is a type of irregular heartbeat, in either men or women.

"This is largest prospective study to date on the association between coffee consumption and risk of atrial fibrillation. We find no evidence that high consumption of coffee increases the risk of atrial fibrillation," Susanna Larsson, an associate professor of epidemiology at the Karolinska Institute in Sweden and lead author on the study, said in a statement.

"This is important because it shows that people who like coffee can safely continue to consume it, at least in moderation, without the risk of developing this condition," Larsson said.

The study comes on the heels of an earlier study from this year, which suggested that coffee may lower the risk of heart attacks.

In the new study, the researchers looked at data from about 42,000 men and nearly 35,000 women who were participating in two long-running studies, the Cohort of Swedish Men and the Swedish Mammography Cohort. In 1997, all the participants filled out questionnaires that asked about their health and diet, including how many cups of coffee they drank daily or weekly. During the 12-year follow-up period, the researchers used the Swedish Hospital Discharge Register to determine which patients developed atrial fibrillation.

The researchers found no association between coffee consumption and an increased risk of atrial fibrillation, though they did observe a slight increase in risk when they limited the analysis to men. However, this increase was not statistically significant (meaning it could have been due to chance), the researchers wrote.

"Whether men may be more sensitive to a high coffee or caffeine intake warrants further study," the researchers wrote in their article, published today (Sept. 22) in the journal BioMed Central.

The researchers also did a meta-analysis, looking at six other studies on atrial fibrillation and coffee intake, which confirmed their results.

The researchers cautioned that although coffee does not appear to increase the risk of atrial fibrillation, it may increase risk for other types of irregular heartbeats.

Copyright 2015 LiveScience, a Purch company. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.