Enzalutamide is an oral androgen-receptor inhibitor that has been shown to improve survival in two placebo-controlled phase 3 trials, and is approved for patients with metastatic castration-resistant prostate cancer. The objective of the TERRAIN study was to compare the efficacy and safety of enzalutamide with bicalutamide in patients with metastatic castration-resistant prostate cancer. TERRAIN was a double-blind, randomised phase 2 study, that recruited asymptomatic or minimally symptomatic men with prostate cancer progression on androgen-deprivation therapy (ADT) from academic, community, and private health-care provision sites across North America and Europe. Eligible patients were randomly assigned (1:1) via an interactive voice response system to receive enzalutamide 160 mg/day or bicalutamide 50 mg/day, both taken orally, in addition to ADT, until disease progression. Patients were stratified by a permutated block method (block size of four), by whether bilateral orchiectomy or receipt of luteinising hormone-releasing hormone agonist or antagonist therapy started before or after the diagnosis of metastases, and by study site. Participants, investigators, and those assessing outcomes were masked to group assignment. The primary endpoint was progression-free survival, analysed in all randomised patients. Safety outcomes were analysed in all patients who received at least one dose of study drug. The open-label period of the trial is in progress, wherein patients still on treatment at the end of the double-blind treatment period were offered open-label enzalutamide at the discretion of the patient and study investigator. This trial is registered with ClinicalTrials.gov, number NCT01288911. Between March 22, 2011, and July 11, 2013, 375 patients were randomly assigned, 184 to enzalutamide and 191 to bicalutamide. 126 (68%) and 168 (88%) patients, respectively, discontinued their assigned treatment before study end, mainly due to progressive disease. Median follow-up time was 20·0 months (IQR 15·0-25·6) in the enzalutamide group and 16·7 months (10·2-21·9) in the bicalutamide group. Patients in the enzalutamide group had significantly improved median progression-free survival (15·7 months [95% CI 11·5-19·4]) compared with patients in the bicalutamide group (5·8 months [4·8-8·1]; hazard ratio 0·44 [95% CI 0·34-0·57]; p<0·0001). Of the most common adverse events, those occurring more frequently with enzalutamide than with bicalutamide were fatigue (51 [28%] of 183 patients in the enzalutamide group vs 38 [20%] of 189 in the bicalutamide group), back pain (35 [19%] vs 34 [18%]), and hot flush (27 [15%] vs 21 [11%]); those occurring more frequently with bicalutamide were nausea (26 [14%] vs 33 [17%]), constipation (23 [13%] vs 25 [13%]), and arthralgia (18 [10%] vs 30 [16%]). The most common grade 3 or worse adverse events in the enzalutamide or bicalutamide treatment groups, respectively, were hypertension (13 [7%] vs eight [4%]), hydronephrosis (three [2%] vs seven [4%]), back pain (five [3%] vs three [2%]), pathological fracture (five [3%] vs two [1%]), dyspnoea (four [2%] vs one [1%]), bone pain (one [1%] vs four [2%]), congestive cardiac failure (four [2%] vs two [1%]), myocardial infarction (five [3%] vs none), and anaemia (four [2%] vs none]). Serious adverse events were reported by 57 (31%) of 183 patients and 44 (23%) of 189 patients in the enzalutamide and bicalutamide groups, respectively. One of the nine deaths in the enzalutamide group was thought to be possibly related to treatment (due to systemic inflammatory response syndrome) compared with none of the three deaths in the bicalutamide group. The data from the TERRAIN trial support the use of enzalutamide rather than bicalutamide in patients with asymptomatic or mildly symptomatic metastatic castration-resistant prostate cancer. Astellas Pharma, Inc and Medivation, Inc.