Background: Docetaxel-based chemotherapy is effective in metastatic gastric and gastro-oesophageal junction adenocarcinoma. This study reports on the safety and efficacy of the docetaxel-based triplet FLOT (fluorouracil plus leucovorin, oxaliplatin and docetaxel)as a perioperative therapy for patients with locally advanced, resectable tumours. Methods: In this controlled, open-label, phase 2/3 trial, we randomly assigned 716 patients with histologically-confirmed advanced clinical stage cT2 or higher or nodal positive stage (cN+), or both, resectable tumours, with no evidence of distant metastases, via central interactive web-based-response system, to receive either three pre-operative and three postoperative 3-week cycles of 50 mg/m2 epirubicin and 60 mg/m2 cisplatin on day 1 plus either 200 mg/m2 fluorouracil as continuous intravenous infusion or 1250 mg/m2 capecitabine orally on days 1 to 21 (ECF/ECX; control group)or four preoperative and four postoperative 2-week cycles of 50 mg/m2 docetaxel, 85 mg/m2 oxaliplatin, 200 mg/m2 leucovorin and 2600 mg/m2 fluorouracil as 24-h infusion on day 1 (FLOT; experimental group). The primary outcome of the trial was overall survival (superiority)analysed in the intention-to-treat population. This trial is registered with ClinicalTrials.gov, number NCT01216644. Findings: Between Aug 8, 2010, and Feb 10, 2015, 716 patients were randomly assigned to treatment in 38 German hospitals or with practice-based oncologists. 360 patients were assigned to ECF/ECX and 356 patients to FLOT. Overall survival was increased in the FLOT group compared with the ECF/ECX group (hazard ratio [HR]0·77; 95% confidence interval [CI; 0.63 to 0·94]; median overall survival, 50 months [38·33 to not reached]vs 35 months [27·35 to 46·26]). The number of patients with related serious adverse events (including those occurring during hospital stay for surgery)was similar in the two groups (96 [27%]in the ECF/ECX group vs 97 [27%]in the FLOT group), as was the number of toxic deaths (two [<1%]in both groups). Hospitalisation for toxicity occurred in 94 patients (26%)in the ECF/ECX group and 89 patients (25%)in the FLOT group. Interpretation: In locally advanced, resectable gastric or gastro-oesophageal junction adenocarcinoma, perioperative FLOT improved overall survival compared with perioperative ECF/ECX. Funding: The German Cancer Aid (Deutsche Krebshilfe), Sanofi-Aventis, Chugai, and Stiftung Leben mit Krebs Foundation.