Aims/hypothesis: The study aimed to assess the incidence, age of onset, survival and relative hazard of dementia in well-categorised community-based patients with type 2 diabetes compared with a matched cohort of individuals without diabetes. Methods: A longitudinal observational study was undertaken involving 1291 participants with type 2 diabetes from the Fremantle Diabetes Study and 5159 matched residents without documented diabetes. Linkage with health-related databases was used to detect incident dementia. Relative hazards were assessed using both cause-specific and subdistribution proportional hazards models. Results: During 13.8 ± 5.8 years of follow-up, incident dementia occurred in 13.9% and 12.4% of the groups of participants with and without diabetes, respectively (p = 0.15). With type 2 diabetes, the incidence of dementia was higher (incidence rate ratio [IRR] 1.28, 95% CI 1.08, 1.51), as was the competing risk of death (IRR 1.50, 95% CI 1.38, 1.64). The ages when dementia was first recorded and when death with dementia occurred were both earlier with diabetes, by 1.7 (95% CI 0.6, 2.9) and 2.3 (95% CI 1.1, 3.6) years, respectively (both p ≤ 0.004). Type 2 diabetes was associated with an adjusted subdistribution HR of 1.18 (95% CI 1.00, 1.39), and a cause-specific HR of 1.51 (95% CI 1.27, 1.78) for all-cause dementia. Conclusions/interpretation: Type 2 diabetes is associated with an increased incidence of dementia, and dementia onset occurs at a younger age. The relative hazards of both dementia and premature mortality are increased and, as a consequence, the increased risk of dementia in type 2 diabetes is not as marked as suggested by cause-specific HRs.