Abstract: There are comparatively few international studies investigating suicide in military veterans and no recent UK–wide studies. This is important because the wider context of being a UK Armed Forces (UKAF) veteran has changed in recent years following a period of intensive operations. This study aimed to investigate the rate, timing, and risk factors for suicide in personnel who left the UKAF over a 23–year period. This study carried out a retrospective cohort study of suicide in personnel who left the regular UKAF between 1996 and 2018 linking national databases of discharged personnel and suicide deaths, using survival analysis to examine the risk of suicide in veterans compared to the general population and conditional logistic regression to investigate factors most strongly associated with suicide after discharge. The 458,058 individuals who left the UKAF accumulated over 5,852,100 person years at risk, with a median length of follow–up of 13 years, were mostly male (91%), and had a median age of 26 years at discharge. 1,086 (0.2%) died by suicide. The overall rate of suicide in veterans was slightly lower than the general population (standardised mortality ratio, SMR [95% confidence interval, CI] 94 [88 to 99]). However, suicide risk was 2 to 3 times higher in male and female veterans aged under 25 years than in the same age groups in the general population (age–specific mortality ratios ranging from 160 to 409). Male veterans aged 35 years and older were at reduced risk of suicide (age–specific mortality ratios 47 to 80). Male sex, Army service, discharge between the ages of 16 and 34 years, being untrained on discharge, and length of service under 10 years were associated with higher suicide risk. Factors associated with reduced risk included being married, a higher rank, and deployment on combat operations. The rate of contact with specialist NHS mental health services (273/1,086, 25%) was lowest in the youngest age groups (10% for 16– to 19–year–olds; 23% for 20– to 24–year–olds). Study limitations include the fact that information on veterans was obtained from administrative databases and the role of pre–service vulnerabilities and other factors that may have influenced later suicide risk could not be explored. In addition, information on contact with support services was only available for veterans in contact with specialist NHS mental health services and not for those in contact with other health and social care services. In this study, it was found suicide risk in personnel leaving the UKAF was not high but there are important differences according to age, with higher risk in young men and women. This found a number of factors which elevated the risk of suicide but deployment was associated with lower risk. The focus should be on improving and maintaining access to mental health care and social support for young service leavers, as well as implementing general suicide prevention measures for all veterans regardless of age.