Background: In the ARISTOTLE trial, the rate of stroke or systemic embolism was reduced by apixaban compared with warfarin in patients with atrial fibrillation (AF). Patients with AF and previous stroke or transient ischaemic attack (TIA) have a high risk of stroke. We therefore aimed to assess the efficacy and safety of apixaban compared with warfarin in prespecified subgroups of patients with and without previous stroke or TIA. Methods: Between Dec 19, 2006, and April 2, 2010, patients were enrolled in the ARISTOTLE trial at 1034 clinical sites in 39 countries. 18 201 patients with AF or atrial flutter were randomly assigned to receive apixaban 5 mg twice daily or warfarin (target international normalised ratio 2·0-3·0). The median duration of follow-up was 1·8 years (IQR 1·4-2·3). The primary efficacy outcome was stroke or systemic embolism, analysed by intention to treat. The primary safety outcome was major bleeding in the on-treatment population. All participants, investigators, and sponsors were masked to treatment assignments. In this subgroup analysis, we estimated event rates and used Cox models to compare outcomes in patients with and without previous stroke or TIA. The ARISTOTLE trial is registered with ClinicalTrials.gov, number NTC00412984. Findings: Of the trial population, 3436 (19%) had a previous stroke or TIA. In the subgroup of patients with previous stroke or TIA, the rate of stroke or systemic embolism was 2·46 per 100 patient-years of follow-up in the apixaban group and 3·24 in the warfarin group (hazard ratio [HR] 0·76, 95% CI 0·56 to 1·03); in the subgroup of patients without previous stroke or TIA, the rate of stroke or systemic embolism was 1·01 per 100 patient-years of follow-up with apixaban and 1·23 with warfarin (HR 0·82, 95% CI 0·65 to 1·03; p for interaction=0·71). The absolute reduction in the rate of stroke and systemic embolism with apixaban versus warfarin was 0·77 per 100 patient-years of follow-up (95% CI -0·08 to 1·63) in patients with and 0·22 (-0·03 to 0·47) in those without previous stroke or TIA. The difference in major bleeding with apixaban compared with warfarin was 1·07 per 100 patient-years (95% CI 0·09-2·04) in patients with and 0·93 (0·54-1·32) in those without previous stroke or TIA. Interpretation: The effects of apixaban versus warfarin were consistent in patients with AF with and without previous stroke or TIA. Owing to the higher risk of these outcomes in patients with previous stroke or TIA, the absolute benefits of apixaban might be greater in this population. Funding: Bristol-Myers Squibb and Pfizer.