Persistent moderate or severe unipolar depression is common and expensive to treat. Clinical guidelines recommend combined pharmacotherapy and psychotherapy. Such treatments can take up to 1 year to show an effect, but no trials of suitable duration have been done. We investigated the efficacy and cost-effectiveness of outpatient-based, specialist depression services (SDS) versus treatment as usual (TAU) on depression symptoms and function. We did a multicentre, single-blind, patient-level, parallel, randomised controlled trial (RCT), as part of the National Institute for Health Research (NIHR) Collaboration for Leadership in Applied Health Research and Care (CLAHRC) study, in three mental health outpatient settings in England. Eligible participants were in secondary care, were older than 18 years, had unipolar depression (with a current major depressive episode, a 17-item Hamilton Depression Rating Scale [HDRS17] score of ≥16, and a Global Assessment of Function [GAF] score of ≤60), and had not responded to 6 months or more of treatment for depression. Randomisation was stratified by site with allocation conveyed to a trial administrator, with research assessors masked to outcome. Patients were randomised (1:1) using a computer-generated pseudo-random code with random permuted blocks of varying sizes of two, four, or six to either SDS (collaborative care approach between psychiatrists and cognitive behavioural therapists for 12 months, followed by graduated transfer of care up to 15 months) or to the TAU group. Intention-to-treat primary outcome measures were changes in HDRS17 and GAF scores between baseline and 6, 12, and 18 months' follow-up. We will separately publish follow-up outcomes for months 24 and 36. Clinical efficacy and cost-effectiveness were examined from health and social care persp ectives at 18 months, as recommended by the National Institute for Health and Care Excellence. This trial is registered at ClinicalTrials.gov (NCT01047124) and the ISRCTN registry (ISRCTN10963342); the trial has ended. 307 patients were assessed for eligibility between Dec 21, 2009, and Oct 31, 2012. 94 patients were assigned to TAU and 93 patients to SDS, and were included in intention-to-treat analyses. The changes from baseline to 6 months in HDRS17 and GAF scores did not significantly differ between treatment groups (mean change difference in HDRS17 score -1·01 [95% CI -3·30 to 1·28], p=0·385; and in GAF score 1·33 [-2·92 to 5·57], p=0·538). Primary outcome data were available for 134 (72%) patients at 12 months. We noted no differences at 12 months' follow-up between SDS and TAU for mean HDRS17 score (14·8 [SD 7·9] in the SDS group vs 17·2 [7·3] in the TAU group, p=0·056) or GAF score (60·4 [11·7] vs 55·8 [12·7], p=0·064), and the changes from baseline to 12 months in HDRS17 and GAF scores did not significantly differ between treatment groups (mean change difference in HDRS17 score -2·45 [95% CI -5·04 to 0·14], p=0·064; and in GAF score 4·12 [-0·11 to 8·35], p=0·056). The mean change in HDRS17 score from baseline to 18 months was significantly improved in the SDS group compared with the TAU group (13·6 [SD 8·8] in the SDS group vs 16·1 [6·6] in the TAU group; mean change difference -2·96 [95% CI -5·33 to -0·59], p=0·015), but the GAF scores showed no significant differences between the groups (61·2 [SD 13·0] vs 57·7 [11·9]; mean change difference 3·82 [-9·3 to 8·57], p=0·113). We reported no deaths, but one (1%) patient was admitted to hospital for myocardial infarction, and three episodes of self-harm were reported in three (2%) patients (two receiving TAU, one receiving SDS care). The incremental cost-effectiveness ratio of SDS versus TAU was £43 603 per quality-adjusted life-year. Compared with usual specialist mental health secondary care, SDS might improve depression symptoms for patients with persistent moderate to severe depression, but functional outcomes and economic benefits are equivocal. National Institute for Health Research Collaboration for Leadership in Applied Health Research and Care, UK Medical Research Council, Nottinghamshire Healthcare NHS Foundation Trust, Derbyshire Healthcare NHS Foundation Trust, Cambridgeshire and Peterborough NHS Foundation Trust, University of Nottingham.