Intraoperative electrocorticography is used to tailor epilepsy surgery by analysing interictal spikes or spike patterns that can delineate epileptogenic tissue. High-frequency oscillations (HFOs) on intraoperative electrocorticography have been proposed as a new biomarker of epileptogenic tissue, with higher specificity than spikes. We prospectively tested the non-inferiority of HFO-guided tailoring of epilepsy surgery to spike-guided tailoring on seizure freedom at 1 year. The HFO trial was a randomised, single-blind, adaptive non-inferiority trial at an epilepsy surgery centre (UMC Utrecht) in the Netherlands. We recruited children and adults (no age limits) who had been referred for intraoperative electrocorticography-tailored epilepsy surgery. Participants were randomly allocated (1:1) to either HFO-guided or spike-guided tailoring, using an online randomisation scheme with permuted blocks generated by an independent data manager, stratified by epilepsy type. Treatment allocation was masked to participants and clinicians who documented seizure outcome, but not to the study team or neurosurgeon. Ictiform spike patterns were always considered in surgical decision making. The primary endpoint was seizure outcome after 1 year (dichotomised as seizure freedom [defined as Engel 1A-B] vs seizure recurrence [Engel 1C-4]). We predefined a non-inferiority margin of 10% risk difference. Analysis was by intention to treat, with prespecified subgroup analyses by epilepsy type and for confounders. This completed trial is registered with the Dutch Trial Register, Toetsingonline ABR.NL44527.041.13, and ClinicalTrials.gov, NCT02207673. Between Oct 10, 2014, and Jan 31, 2020, 78 individuals were enrolled to the study and randomly assigned (39 to HFO-guided tailoring and 39 to spike-guided tailoring). There was no loss to follow-up. Seizure freedom at 1 year occurred in 26 (67%) of 39 participants in the HFO-guided group and 35 (90%) of 39 in the spike-guided group (risk difference -23·5%, 90% CI -39·1 to -7·9; for the 48 patients with temporal lobe epilepsy, the risk difference was -25·5%, -45·1 to -6·0, and for the 30 patients with extratemporal lobe epilepsy it was -20·3%, -46·0 to 5·4). Pathology associated with poor prognosis was identified as a confounding factor, with an adjusted risk difference of -7·9% (90% CI -20·7 to 4·9; adjusted risk difference -12·5%, -31·0 to 5·9, for temporal lobe epilepsy and 5·8%, -7·7 to 19·5, for extratemporal lobe epilepsy). We recorded eight serious adverse events (five in the HFO-guided group and three in the spike-guided group) requiring hospitalisation. No patients died. HFO-guided tailoring of epilepsy surgery was not non-inferior to spike-guided tailoring on intraoperative electrocorticography. After adjustment for confounders, HFOs show non-inferiority in extratemporal lobe epilepsy. This trial challenges the clinical value of HFOs as an epilepsy biomarker, especially in temporal lobe epilepsy. Further research is needed to establish whether HFO-guided intraoperative electrocorticography holds promise in extratemporal lobe epilepsy. UMCU Alexandre Suerman, EpilepsieNL, RMI Talent Fellowship, European Research Council, and MING Fund.