Young adults represent a third of the United Kingdom prison population and are at risk of poor health outcomes, including drug and alcohol misuse, self-harm and suicide. Court diversion interventions aim to reduce the negative consequences of criminal sanctions and address the root causes of offending. However, evidence of their effectiveness has not yet been established. The Gateway programme, issued as a conditional caution, aimed to improve the life chances of young adults committing low-level offences. Participants agreed not to reoffend during the 16-week caution and, following a needs assessment, received individual support from a Gateway navigator and attended two workshops encouraging analysis of own behaviour and its consequences. To evaluate the effectiveness and cost-effectiveness of Gateway in relation to health and well-being of participants compared to usual process (court summons or a different conditional caution). Pragmatic, multisite, parallel-group, superiority randomised controlled trial with two 6-month internal pilots and a target sample size of 334. Randomisation between Gateway and usual process was on a 1 : 1 basis. Four Hampshire Constabulary sites recruited 18- to 24-year-old residents of Hampshire and Isle of Wight who were questioned for an eligible low-level offence. Semistructured interviews were also held with a sample of Gateway programme participants, staff and police study recruiters. Primary outcome was the Warwick-Edinburgh Mental Wellbeing Scale score at 12 months. Secondary outcomes included health status, alcohol and drug use, recidivism and resource use. Recruitment commenced in October 2019 and the trial stopped in April 2021. A total of 191 participants were recruited, with 109 randomised to Gateway and 82 to usual process. Due to an initial overestimation of potentially eligible young people and low retention rates, recruitment targets were adjusted, and a range of mitigating measures introduced. Although recruitment broadly met study progression criteria [35/50 (70%) Pilot 1: 64/74 (86%) Pilot 2], retention was low throughout (overall: data collected at week 4 was 50%: at week 16 it was 50%: 1-year 37%). Low retention was multifactorial, with one of the main barriers being difficulties contacting participants. It was therefore not possible to complete the randomised controlled trial or the health economics analyses. Qualitative interviews held with 58 individuals yielded rare insights into the benefits and limitations of this type of intervention, as well as barriers and facilitators in relation to recruitment in this setting. Despite close collaboration with the police to address recruitment and consent issues, expansion of the inclusion criteria and recruitment area and introducing other measures, the researchers were unable to collect sufficient data within an acceptable timeframe. The Gateway study was a unique endeavour to gather evidence for a potentially life-changing intervention for an underserved population. The experience gained indicates that randomised controlled trials of interventions, with a health-related outcome, are possible in this setting but point towards the need for conservative recruitment and retention estimates in this target population. Other study designs should be considered. The qualitative evaluation provided a range of valuable lessons for those seeking to design similar interventions or conduct research in similar settings. This study is registered as ISRCTN11888938. This award was funded by the National Institute for Health and Care Research (NIHR) Public Health Research programme (NIHR award ref: 16/122/20) and is published in full in Public Health Research; Vol. 12, No. 7. See the NIHR Funding and Awards website for further award information.