The validity of atrial fibrillation (AF) diagnoses in national registers for use as endpoints in prospective studies has not been evaluated. We studied the validity of AF diagnoses in Swedish national hospital discharge and cause of death registers and the occurrence of and risk factors for AF in a middle-aged Swedish population using these registers. Our study included the 30,447 individuals(age 44-73) who attended baseline visits in 1991-1996 of the Malmö Diet and Cancer study. Individuals with a first AF diagnosis were identified by record linkage with national registers. A subset of cases was randomly selected for validation by examination of electrocardiograms and patient records. Electrocardiograms were available in 98%of the validation sample (95% definitive AF, 3% no AF).The 2% with ECGs unavailable had probable AF. Baseline AF prevalence was 1.3%, higher in men and increased with age. During 11.2 years of follow-up 1430 first AF diagnoses occurred. Risk factors were age, hypertension, BMI,diabetes, history of heart failure, history of myocardial infarction and, in men but not women, current smoking.The strongest risk factors were history of heart failure(hazard ratio men 4.5, women 8.7) and myocardial infarction(hazard ratio men 2.0, women 1.8). The largest population-attributable risks were observed for hypertension (men 38%, women 34%) and obesity (men 11%, women 10%).In conclusion, case misclassification of AF in national registers is small, indicating feasibility of use in prospective studies. Hypertension and obesity account for large portions of population risk in middle-aged individuals with low prevalence of manifest cardiac disease.