BACKGROUND: Clinical trials and meta-analyses have suggested that aspirin may be effective for the prevention of venous thromboembolism (proximal deep-vein thrombosis or pulmonary embolism) after total hip or total knee arthroplasty, but comparisons with direct oral anticoagulants are lacking for prophylaxis beyond hospital discharge. METHODS: We performed a multicenter, double-blind, randomized, controlled trial involving patients who were undergoing total hip or knee arthroplasty. All the patients received once-daily oral rivaroxaban (10 mg) until postoperative day 5 and then were randomly assigned to continue rivaroxaban or switch to aspirin (81 mg daily) for an additional 9 days after total knee arthroplasty or for 30 days after total hip arthroplasty. Patients were followed for 90 days for symptomatic venous thromboembolism (the primary effectiveness outcome) and bleeding complications, including major or clinically relevant nonmajor bleeding (the primary safety outcome). RESULTS: A total of 3424 patients (1804 undergoing total hip arthroplasty and 1620 undergoing total knee arthroplasty) were enrolled in the trial. Venous thromboembolism occurred in 11 of 1707 patients (0.64%) in the aspirin group and in 12 of 1717 patients (0.70%) in the rivaroxaban group (difference, 0.06 percentage points; 95% confidence interval [CI],-0.55 to 0.66; P<0.001 for noninferiority and P = 0.84 for superiority). Major bleeding complications occurred in 8 patients (0.47%) in the aspirin group and in 5 (0.29%) in the rivaroxaban group (difference, 0.18 percentage points; 95% CI,-0.65 to 0.29; P = 0.42). Clinically important bleeding occurred in 22 patients (1.29%) in the aspirin group and in 17 (0.99%) in the rivaroxaban group (difference, 0.30 percentage points; 95% CI,-1.07 to 0.47; P = 0.43). CONCLUSIONS: Among patients who received 5 days of rivaroxaban prophylaxis after total hip or total knee arthroplasty, extended prophylaxis with aspirin was not significantly different from rivaroxaban in the prevention of symptomatic venous thromboembolism.