Persecutory delusions are a major psychiatric problem that often do not respond sufficiently to standard pharmacological or psychological treatments. We developed a new brief automated virtual reality (VR) cognitive treatment that has the potential to be used easily in clinical services. We aimed to compare VR cognitive therapy with an alternative VR therapy (mental relaxation), with an emphasis on understanding potential mechanisms of action. THRIVE was a parallel-group, single-blind, randomised controlled trial across four UK National Health Service trusts in England. Participants were included if they were aged 16 years or older, had a persistent (at least 3 months) persecutory delusion held with at least 50% conviction, reported feeling threatened when outside with other people, and had a primary diagnosis from the referring clinical team of a non-affective psychotic disorder. We randomly assigned (1:1) patients to either THRIVE VR cognitive therapy or VR mental relaxation, using a permuted blocks algorithm with randomly varying block size, stratified by severity of delusion. Usual care continued for all participants. Each VR therapy was provided in four sessions over approximately 4 weeks, supported by an assistant psychologist or clinical psychologist. Trial assessors were masked to group allocation. Outcomes were assessed at 0, 2 (therapy mid-point), 4 (primary endpoint, end of treatment), 8, 16, and 24 weeks. The primary outcome was persecutory delusion conviction, assessed by the Psychotic Symptoms Rating Scale (PSYRATS; rated 0-100%). Outcome analyses were done in the intention-to-treat population. We assessed the treatment credibility and expectancy of the interventions and the two mechanisms (defence behaviours and safety beliefs) that the cognitive intervention was designed to target. This trial is prospectively registered with the ISRCTN registry, ISRCTN12497310. From Sept 21, 2018, to May 13, 2021 (with a pause due to COVID-19 pandemic restrictions from March 16, 2020, to Sept 14, 2020), we recruited 80 participants with persistent persecutory delusions (49 [61%] men, 31 [39%] women, with a mean age of 40 years [SD 13, range 18-73], 64 [80%] White, six [8%] Black, one [1%] Indian, three [4%] Pakistani, and six [8%] other race or ethnicity). We randomly assigned 39 (49%) participants assigned to VR cognitive therapy and 41 (51%) participants to VR mental relaxation. 33 (85%) participants who were assigned to VR cognitive therapy attended all four sessions, and 35 (85%) participants assigned to VR mental relaxation attended all four sessions. We found no significant differences between the two VR interventions in participant ratings of treatment credibility (adjusted mean difference -1·55 [95% CI -3·68 to 0·58]; p=0·15) and outcome expectancy (-0·91 [-3·42 to 1·61]; p=0·47). 77 (96%) participants provided follow-up data at the primary timepoint. Compared with VR mental relaxation, VR cognitive therapy did not lead to a greater improvement in persecutory delusions (adjusted mean difference -2·16 [-12·77 to 8·44]; p=0·69). Compared with VR mental relaxation, VR cognitive therapy did not lead to a greater reduction in use of defence behaviours (adjusted mean difference -0·71 [-4·21 to 2·79]; p=0·69) or a greater increase in belief in safety (-5·89 [-16·83 to 5·05]; p=0·29). There were 17 serious adverse events unrelated to the trial (ten events in seven participants in the VR cognitive therapy group and seven events in five participants in the VR mental relaxation group). The two VR interventions performed similarly, despite the fact that they had been designed to affect different mechanisms. Both interventions had high uptake rates and were associated with large improvements in persecutory delusions but it cannot be determined that the treatments accounted for the change. Immersive technologies hold promise for the treatment of severe mental health problems. However, their use will likely benefit from experimental research on the application of different therapeutic techniques and the effects on a range of potential mechanisms of action. Medical Research Council Developmental Pathway Funding Scheme and National Institute for Health and Care Research Oxford Health Biomedical Research Centre.