Multiple sclerosis risk has a well-established polygenic component, yet the genetic contribution to disease course and severity remains unclear and difficult to examine. Accurately measuring disease progression requires long-term study of clinical and radiological outcomes with sufficient follow-up duration to confidently confirm disability accrual and multiple sclerosis phenotypes. In this retrospective study, we explore genetic influences on long-term disease course and severity; in a unique cohort of clinically isolated syndrome patients with homogenous 30-year disease duration, deep clinical phenotyping and advanced MRI metrics. Sixty-one clinically isolated syndrome patients [41 female (67%): 20 male (33%)] underwent clinical and MRI assessment at baseline, 1-, 5-, 10-, 14-, 20- and 30-year follow-up (mean age ± standard deviation: 60.9 ± 6.5 years). After 30 years, 29 patients developed relapsing-remitting multiple sclerosis, 15 developed secondary progressive multiple sclerosis and 17 still had a clinically isolated syndrome. Twenty-seven genes were investigated for associations with clinical outcomes [including disease course and Expanded Disability Status Scale (EDSS)] and brain MRI (including white matter lesions, cortical lesions, and brain tissue volumes) at the 30-year follow-up. Genetic associations with changes in EDSS, relapses, white matter lesions and brain atrophy (third ventricular and medullary measurements) over 30 years were assessed using mixed-effects models. HLA-DRB1*1501-positive (n = 26) patients showed faster white matter lesion accrual [+1.96 lesions/year (0.64-3.29), P = 3.8 × 10-3], greater 30-year white matter lesion volumes [+11.60 ml, (5.49-18.29), P = 1.27 × 10-3] and higher annualized relapse rates [+0.06 relapses/year (0.005-0.11), P = 0.031] compared with HLA-DRB1*1501-negative patients (n = 35). PVRL2-positive patients (n = 41) had more cortical lesions (+0.83 [0.08-1.66], P = 0.042), faster EDSS worsening [+0.06 points/year (0.02-0.11), P = 0.010], greater 30-year EDSS [+1.72 (0.49-2.93), P = 0.013; multiple sclerosis cases: +2.60 (1.30-3.87), P = 2.02 × 10-3], and greater risk of secondary progressive multiple sclerosis [odds ratio (OR) = 12.25 (1.15-23.10), P = 0.031] than PVRL2-negative patients (n = 18). In contrast, IRX1-positive (n = 30) patients had preserved 30-year grey matter fraction [+0.76% (0.28-1.29), P = 8.4 × 10-3], lower risk of cortical lesions [OR = 0.22 (0.05-0.99), P = 0.049] and lower 30-year EDSS [-1.35 (-0.87,-3.44), P = 0.026; multiple sclerosis cases: -2.12 (-0.87, -3.44), P = 5.02 × 10-3] than IRX1-negative patients (n = 30). In multiple sclerosis cases, IRX1-positive patients also had slower EDSS worsening [-0.07 points/year (-0.01,-0.13), P = 0.015] and lower risk of secondary progressive multiple sclerosis [OR = 0.19 (0.04-0.92), P = 0.042]. These exploratory findings support diverse genetic influences on pathological mechanisms associated with multiple sclerosis disease course. HLA-DRB1*1501 influenced white matter inflammation and relapses, while IRX1 (protective) and PVRL2 (adverse) were associated with grey matter pathology (cortical lesions and atrophy), long-term disability worsening and the risk of developing secondary progressive multiple sclerosis