Background: Coronary artery disease is a major cause of morbidity and mortality worldwide, and is a consequence of acute thrombotic events involving activation of platelets and coagulation proteins. Factor Xa inhibitors and aspirin each reduce thrombotic events but have not yet been tested in combination or against each other in patients with stable coronary artery disease. Methods: In this multicentre, double-blind, randomised, placebo-controlled, outpatient trial, patients with stable coronary artery disease or peripheral artery disease were recruited at 602 hospitals, clinics, or community centres in 33 countries. This paper reports on patients with coronary artery disease. Eligible patients with coronary artery disease had to have had a myocardial infarction in the past 20 years, multi-vessel coronary artery disease, history of stable or unstable angina, previous multi-vessel percutaneous coronary intervention, or previous multi-vessel coronary artery bypass graft surgery. After a 30-day run in period, patients were randomly assigned (1:1:1) to receive rivaroxaban (2·5 mg orally twice a day) plus aspirin (100 mg once a day), rivaroxaban alone (5 mg orally twice a day), or aspirin alone (100 mg orally once a day). Randomisation was computer generated. Each treatment group was double dummy, and the patients, investigators, and central study staff were masked to treatment allocation. The primary outcome of the COMPASS trial was the occurrence of myocardial infarction, stroke, or cardiovascular death. This trial is registered with ClinicalTrials.gov, number NCT01776424, and is closed to new participants. Findings: Between March 12, 2013, and May 10, 2016, 27395 patients were enrolled to the COMPASS trial, of whom 24824 patients had stable coronary artery disease from 558 centres. The combination of rivaroxaban plus aspirin reduced the primary outcome more than aspirin alone (347 [4%] of 8313 vs 460 [6%] of 8261; hazard ratio [HR] 0·74, 95% CI 0·65-0·86, p<0·0001). By comparison, treatment with rivaroxaban alone did not significantly improve the primary outcome when compared with treatment with aspirin alone (411 [5%] of 8250 vs 460 [6%] of 8261; HR 0·89, 95% CI 0·78-1·02, p=0·094). Combined rivaroxaban plus aspirin treatment resulted in more major bleeds than treatment with aspirin alone (263 [3%] of 8313 vs 158 [2%] of 8261; HR 1·66, 95% CI 1·37-2·03, p<0·0001), and similarly, more bleeds were seen in the rivaroxaban alone group than in the aspirin alone group (236 [3%] of 8250 vs 158 [2%] of 8261; HR 1·51, 95% CI 1·23-1·84, p<0·0001). The most common site of major bleeding was gastrointestinal, occurring in 130 [2%] patients who received combined rivaroxaban plus aspirin, in 84 [1%] patients who received rivaroxaban alone, and in 61 [1%] patients who received aspirin alone. Rivaroxaban plus aspirin reduced mortality when compared with aspirin alone (262 [3%] of 8313 vs 339 [4%] of 8261; HR 0·77, 95% CI 0·65-0·90, p=0·0012). Interpretation: In patients with stable coronary artery disease, addition of rivaroxaban to aspirin lowered major vascular events, but increased major bleeding. There was no significant increase in intracranial bleeding or other critical organ bleeding. There was also a significant net benefit in favour of rivaroxaban plus aspirin and deaths were reduced by 23%. Thus, addition of rivaroxaban to aspirin has the potential to substantially reduce morbidity and mortality from coronary artery disease worldwide. Funding: Bayer AG.