Background The general belief is that caffeine increases the risk of hyperkinetic arrhythmias, including atrial fibrillation. The aim of this study is to investigate the effect of chronic caffeine intake on incident atrial fibrillation in general population. Design and methods A population cohort of 1475 unselected men and women observed for 12 years and left free to intake food or beverages containing caffeine was studied. Subjects were stratified into tertiles of caffeine intake both in the whole cohort and after genotyping for the -163C > A polymorphism of the CYP1A2 gene, regulating caffeine metabolism. Results In the whole cohort, the 12-year incidence of atrial fibrillation was significantly lower in the third (2.2%) than in the first (10.2%) or second (5.7%) tertile of caffeine intake ( P < 0.001). The same trend was observed in all genotypes; the apparently steeper reduction of atrial fibrillation in slow caffeine metabolisers found at univariate analysis was proved wrong by multivariate Cox analysis. Age, chronic pulmonary disease, history of heart failure and of coronary artery disease, and systolic blood pressure - but not the genotype or the caffeine × CYP1A2 interaction term - were significant confounders of the association between incident atrial fibrillation and being in the third tertile of caffeine intake (hazard ratio 0.249, 95% confidence intervals 0.161-0.458, P < 0.01). Conclusions A higher caffeine intake (>165 mmol/day or > 320 mg/day) is associated with a lower incidence of atrial fibrillation in the 12-year epidemiological prospective setting based on the general population.