The increased risk of dementia after delirium and infection might be influenced by cerebral white matter disease (WMD). In patients with transient ischaemic attack (TIA) and minor stroke, we assessed associations between hospital admissions with delirium and 5-year dementia risk and between admissions with infection and dementia risk, stratified by WMD severity (moderate or severe vs absent or mild) on baseline brain imaging. We included patients with TIA and minor stroke (National Institutes of Health Stroke Score <3) from the Oxford Vascular Study (OXVASC), a longitudinal population-based study of the incidence and outcomes of acute vascular events in a population of 94 567 individuals, with no age restrictions, attending eight general practices in Oxfordshire, UK. Hospitalisation data were obtained through linkage to the Oxford Cognitive Comorbidity, Frailty, and Ageing Research Database-Electronic Patient Records (ORCHARD-EPR). Brain imaging was done using CT and MRI, and WMD was prospectively graded according to the age-related white matter changes (ARWMC) scale and categorised into absent, mild, moderate, or severe WMD. Delirium and infection were defined by ICD-10 coding supplemented by hand-searching of hospital records. Dementia was diagnosed using clinical or cognitive assessment, medical records, and death certificates. Associations between hospitalisation with delirium and hospitalisation with infection, and post-event dementia were assessed using time-varying Cox analysis with multivariable adjustment, and all models were stratified by WMD severity. From April 1, 2002, to March 31, 2012, 1369 individuals were prospectively recruited into the study. Of 1369 patients (655 with TIA and 714 with minor stroke, mean age 72 [SD 13] years, 674 female and 695 male, and 364 with moderate or severe WMD), 209 (15%) developed dementia. Hospitalisation during follow-up occurred in 891 (65%) patients of whom 103 (12%) had at least one delirium episode and 236 (26%) had at least one infection episode. Hospitalisation without delirium or infection did not predict subsequent dementia (HR 1·01, 95% CI 0·86-1·20). In contrast, hospitalisation with delirium predicted subsequent dementia independently of infection in patients with and without WMD (2·64, 1·47-4·74; p=0·0013 vs 3·41, 1·91-6·09; p<0·0001) especially in those with unimpaired baseline cognition (cognitive test score above cutoff; 4·01, 2·23-7·19 vs 3·94, 1·95-7·93; both p≤0·0001). However, hospitalisation with infection only predicted dementia in those with moderate or severe WMD (1·75, 1·04-2·94 vs 0·68, 0·39-1·20; pdiff=0·023). The increased risk of dementia after delirium is unrelated to the presence of WMD, whereas infection increases risk only in patients with WMD, suggesting differences in underlying mechanisms and in potential preventive strategies. National Institute for Health and Care Research and Wellcome Trust.