A trial fibrillation is a condition that can make your heart race and put you at risk for stroke.
"People who reported that they didn't exercise at all had about double the risk of developing fibrillation, when compared to those who were physically active and whose body weight was normal," said co-author Lars Elnan Garnvik from the Norwegian University of Science and Technology's (NTNU).
"However, people who were obese but who exercised a lot limited the increase in risk to no more than approximately 50 per cent. This suggests that physical activity is good for limiting the increased risk of atrial fibrillation in obese people," Garnvik added.
For the study, published in the European Journal of Preventive Cardiology, the research team involved 43,602 men and women who participated in the study between 2006 and 2008.
"Physical activity and exercise reduce a lot of the known risk factors for atrial fibrillation, like high blood pressure, high blood sugar, high cholesterol and chronic inflammation," said co-author Lars Elnan Garnvik from the Norwegian University of Science and Technology (NTNU).
"Physical activity can also improve a person's fitness level, and we know that people in good shape have a reduced risk of heart failure," Garnvik added.