Background: During the past decade, many patients had zotarolimus-eluting stents implanted, which had circular shape cobalt–chromium struts with limited radiographic visibility. The Resolute Onyx stent was developed to improve visibility while reducing strut thickness, which was achieved by using a novel composite wire with a dense platinum–iridium core and an outer cobalt–chromium layer. We did the first randomised clinical trial to assess the safety and efficacy of this often-used stent compared with the Orsiro stent, which consists of ultrathin cobalt–chromium struts. Methods: We did an investigator-initiated, assessor-blinded and patient-blinded, randomised non-inferiority trial in an allcomers population at seven independently monitored centres in Belgium, Israel, and the Netherlands. Eligible participants were aged 18 years or older and required percutaneous coronary intervention with drug-eluting stents. After guide wire passage with or without predilation, members of the catheterisation laboratory team used web-based computer-generated allocation sequences to randomly assign patients (1:1) to either the Resolute Onyx or the Orsiro stent. Randomisation was stratified by sex and diabetes status. Patients and assessors were masked to allocated stents, but treating clinicians were not. The primary endpoint was target vessel failure at 1 year, a composite of cardiac death, target-vessel-related myocardial infarction, and target vessel revascularisation, and was assessed by intention to treat (non-inferiority margin 2·5%) on the basis of outcomes adjudicated by an independent event committee. This trial is registered with ClinicalTrials.gov, number NCT02508714. Findings: Between Oct 7, 2015, and Dec 23, 2016, 2516 patients were enrolled, 2488 of whom were included in the intention-to-treat analysis (28 withdrawals or screening failures). 1243 participants were assigned to the Resolute Onyx group, and 1245 to the Orsiro group. Overall, 1765 (70·9%) participants presented with acute coronary syndromes and 1275 (51·2%) had myocardial infarctions. 1-year follow-up was available for 2478 (99·6%) patients. The primary endpoint was met by 55 (4·5%) patients in the Resolute Onyx group and 58 (4·7%) in the Orsiro group. Non-inferiority of Resolute Onyx to Orsiro was thus established (absolute risk difference −0·2% [95% CI −1·9 to 1·4]; upper limit of the one-sided 95% CI 1·1%; p non-inferiority=0·0005). Definite or probable stent thrombosis occurred in one (0·1%) participant in the Resolute Onyx group and nine (0·7%) in the Orsiro group (hazard ratio 0·11 [95% CI 0·01–0·87]; p=0·0112). Interpretation: The Resolute Onyx stent was non-inferior to Orsiro for a combined safety and efficacy endpoint at 1-year follow-up in allcomers. The low event rate in both groups suggests that both stents are safe, and the very low rate of stent thrombosis in the Resolute Onyx group warrants further clinical investigation. Funding: Biotronik and Medtronic.