Background: Etrolizumab is a gut-targeted, anti-β7 integrin, monoclonal antibody. In an earlier phase 2 induction study, etrolizumab significantly improved clinical remission compared with placebo in patients with moderately to severely active ulcerative colitis. We aimed to evaluate the efficacy and safety of etrolizumab in patients with moderately to severely active ulcerative colitis who had been previously treated with anti-tumour necrosis factor (TNF) agents. Methods: HICKORY was a multicentre, phase 3, double-blind, placebo-controlled study in adult (18–80 years) patients with moderately to severely active ulcerative colitis (Mayo Clinic total score [MCS] of 6–12 with an endoscopic subscore of ≥2, a rectal bleeding subscore of ≥1, and a stool frequency subscore of ≥1) previously treated with TNF inhibitors. Patients were recruited from 184 treatment centres across 24 countries in North America, South America, Europe, Asia, Oceania, and the Middle East. Patients needed to have an established diagnosis of ulcerative colitis for at least 3 months, corroborated by both clinical and endoscopic evidence, and evidence of disease extending at least 20 cm from the anal verge. In cohort 1, patients received open-label etrolizumab 105 mg every 4 weeks for a 14-week induction period. In cohort 2, patients were randomly assigned (4:1) to receive subcutaneous etrolizumab 105 mg or placebo every 4 weeks for the 14-week induction phase. Patients in either cohort achieving clinical response to etrolizumab induction were eligible for the maintenance phase, in which they were randomly assigned (1:1) to receive subcutaneous etrolizumab 105 mg or placebo every 4 weeks through to week 66. Randomisation was stratified by baseline concomitant treatment with corticosteroids, concomitant treatment with immunosuppressants (induction randomisation only), baseline disease activity, week 14 MCS remission status (maintenance randomisation only), and induction cohort (maintenance randomisation only). All patients and study site personnel were masked to treatment assignment. Primary endpoints were remission (Mayo Clinic total score [MCS] ≤2, with individual subscores of ≤1 and a rectal bleeding subscore of 0) at week 14, and remission at week 66 among patients with a clinical response (MCS with ≥3-point decrease and ≥30% reduction from baseline, plus ≥1 point decrease in rectal bleeding subscore or absolute rectal bleeding score of 0 or 1) at week 14. Efficacy was analysed using a modified intent-to-treat population. Safety analyses included all patients who received at least one dose of study drug during the induction phase. This study is registered at ClinicalTrials.gov, NCT02100696. Findings: HICKORY was conducted from May 21, 2014, to April 16, 2020, during which time 1081 patients were screened, and 609 deemed eligible for inclusion. 130 patients were included in cohort 1. In cohort 2,479 patients were randomly assigned to the induction phase (etrolizumab n=384, placebo n=95). 232 patients were randomly assigned to the maintenance phase (etrolizumab to etrolizumab n=117, etrolizumab to placebo n=115). At week 14, 71 (18·5%) of 384 patients in the etrolizumab group and six (6·3%) of 95 patients in the placebo group achieved the primary induction endpoint of remission (p=0·0033). No significant difference between etrolizumab and placebo was observed for the primary maintenance endpoint of remission at week 66 among patients with a clinical response at week 14 (27 [24·1%] of 112 vs 23 [20·2%] of 114; p=0·50). Four patients in the etrolizumab group reported treatment-related adverse events leading to treatment discontinuation. The proportion of patients reporting at least adverse event was similar between treatment groups for induction (etrolizumab 253 [66%] of 384; placebo 63 [66%] of 95) and maintenance (etrolizumab to etrolizumab 98 [88%] of 112; etrolizumab to placebo 97 [85%] of 114). The most common adverse event in both groups was ulcerative colitis flare. Most adverse events were mild or moderate. During induction, the most common serious adverse event was ulcerative colitis flare (etrolizumab ten [3%] of 384; placebo: two [2%] of 95). During maintenance, the most common serious adverse event in the etrolizumab to etrolizumab group was appendicitis (two [2%] of 112) and the most common serious adverse events in the etrolizumab to placebo group were ulcerative colitis flare (two [2%] of 114) and anaemia (two [2%] of 114). Interpretation: HICKORY demonstrated that a significantly higher proportion of patients with moderately to severely active ulcerative colitis who had been previously treated with anti-TNF agent were able to achieve remission at week 14 when treated with etrolizumab compared with placebo; however, there was no significant difference between groups in remission at week 66 among patients with a clinical response at week 14. Funding: F Hoffmann-La Roche.