ImportanceAlthough both head injury and epilepsy are associated with long-term dementia risk, posttraumatic epilepsy (PTE) has only been evaluated in association with short-term cognitive outcomes.ObjectiveTo investigate associations of PTE with dementia risk.Design, Setting, and ParticipantsThe Atherosclerosis Risk in Communities (ARIC) study initially enrolled participants from 1987 to 1989 and this prospective cohort study uses data through December 31, 2019, with a median follow-up of 25 years. Data were analyzed between March 14, 2023, and January 2, 2024. The study took place in 4 US communities in Minnesota, Maryland, North Carolina, and Mississippi. Of 15 792 ARIC study participants initially enrolled, 2061 were ineligible and 1173 were excluded for missing data, resulting in 12 558 included participants.ExposuresHead injury was defined by self-report and International Classification of Diseases (ICD) diagnostic codes. Seizure/epilepsy was defined using ICD codes. PTE was defined as a diagnosis of seizure/epilepsy occurring more than 7 days after head injury. Head injury, seizure/epilepsy, and PTE were analyzed as time-varying exposures.Main Outcomes and MeasuresDementia was defined using cognitive assessments, informant interviews, and ICD and death certificate codes. Adjusted Cox and Fine and Gray proportional hazards models were used to estimate dementia risk.ResultsParticipants had a mean (SD) age of 54.3 (5.8) years at baseline, 57.7% were female, 28.2% were of self-reported Black race, 14.4% were ultimately categorized as having head injury, 5.1% as having seizure/epilepsy, and 1.2% as having PTE. Over a median follow-up of 25 (25th to 75th percentile, 17-30) years, 19.9% developed dementia. In fully adjusted models, compared with no head injury and no seizure/epilepsy, PTE was associated with 4.56 (95% CI, 4.49-5.95) times the risk of dementia, while seizure/epilepsy was associated with 2.61 (95% CI, 2.21-3.07) times the risk and head injury with 1.63 (95% CI, 1.47-1.80) times the risk. The risk of dementia associated with PTE was significantly higher than the risk associated with head injury alone and with nontraumatic seizure/epilepsy alone. Results were slightly attenuated in models accounting for the competing risks of mortality and stroke, but patterns of association remained similar. In secondary analyses, the increased dementia risk associated with PTE occurring after first vs second head injury and after mild vs moderate/severe injury was similar.Conclusions and RelevanceIn this community-based cohort, there was an increased risk of dementia associated with PTE that was significantly higher than the risk associated with head injury or seizure/epilepsy alone. These findings provide evidence that PTE is associated with long-term outcomes and supports both the prevention of head injuries via public health measures and further research into the underlying mechanisms and the risk factors for the development of PTE, so that efforts can also be focused on the prevention of PTE after a head injury.