ObjectiveTo determine whether CYP2C19 loss-of-function (LoF) alleles increase risk of ischaemic stroke and myocardial infarction (MI) in UK primary care patients prescribed clopidogrel.DesignRetrospective cohort analysis.SettingPrimary care practices in the UK from January 1999 to September 2017.Participants7483 European-ancestry adults from the UK Biobank study with genetic and linked primary care data, aged 36–79 years at time of first clopidogrel prescription.InterventionsClopidogrel prescription in primary care, mean duration 2.6 years (range 2 months to 18 years).Main outcome measureHospital inpatient-diagnosed ischaemic stroke, MI or angina while treated with clopidogrel.Results28.7% of participants carried at least one CYP2C19 LoF variant. LoF carriers had higher rates of incident ischaemic stroke while treated with clopidogrel compared with those without the variants (8 per 1000 person-years vs 5.2 per 1000 person-years; HR 1.53, 95% CIs 1.04 to 2.26, p=0.031). LoF carriers also had increased risk of MI (HR 1.14, 95% CI 1.04 to 1.26, p=0.008). In combined analysis LoF carriers had increased risk of any ischaemic event (stroke or MI) (HR 1.17, 95% CI 1.06 to 1.29, p=0.002). Adjustment for aspirin coprescription produced similar estimates. In lifetables using observed incidence rates, 22.5% (95% CI 14.4% to 34.0%) of CYP2C19 LoF carriers on clopidogrel were projected to develop an ischaemic stroke by age 79 (oldest age in the study), compared with 15.4% (95% CI 11.4% to 20.5%) in non-carriers, that is, 7.1% excess stroke incidence in LoF carriers by age 79.ConclusionsA substantial proportion of the UK population carry genetic variants that reduce metabolism of clopidogrel to its active form. In family practice patients on clopidogrel, CYP2C19 LoF variants are associated with substantially higher incidence of ischaemic events. Genotype-guided selection of antiplatelet medications may improve outcomes in patients carrying CYP2C19 genetic variants.