BACKGROUND: The vascular and gastrointestinal effects of non-steroidal anti-inflammatory drugs (NSAIDs), including selective COX-2 inhibitors (coxibs) and traditional non-steroidal anti-inflammatory drugs (tNSAIDs), are not well characterised, particularly in patients at increased risk of vascular disease. We aimed to provide such information through meta-analyses of randomised trials. METHODS: We undertook meta-analyses of 280 trials of NSAIDs versus placebo (124 513 participants, 68 342 person-years) and 474 trials of one NSAID versus another NSAID (229 296 participants, 165 456 person-years). The main outcomes were major vascular events (non-fatal myocardial infarction, non-fatal stroke, or vascular death); major coronary events (non-fatal myocardial infarction or coronary death); stroke; mortality; heart failure; and upper gastrointestinal complications (perforation, obstruction, or bleed). FINDINGS: Major vascular events were increased by about a third by a coxib (rate ratio [RR] 1·37, 95% CI 1·14-1·66; p=0·0009) or diclofenac (1·41, 1·12-1·78; p=0·0036), chiefly due to an increase in major coronary events (coxibs 1·76, 1·31-2·37; p=0·0001; diclofenac 1·70, 1·19-2·41; p=0·0032). Ibuprofen also significantly increased major coronary events (2·22, 1·10-4·48; p=0·0253), but not major vascular events (1·44, 0·89-2·33). Compared with placebo, of 1000 patients allocated to a coxib or diclofenac for a year, three more had major vascular events, one of which was fatal. Naproxen did not significantly increase major vascular events (0·93, 0·69-1·27). Vascular death was increased significantly by coxibs (1·58, 99% CI 1·00-2·49; p=0·0103) and diclofenac (1·65, 0·95-2·85, p=0·0187), non-significantly by ibuprofen (1·90, 0·56-6·41; p=0·17), but not by naproxen (1·08, 0·48-2·47, p=0·80). The proportional effects on major vascular events were independent of baseline characteristics, including vascular risk. Heart failure risk was roughly doubled by all NSAIDs. All NSAID regimens increased upper gastrointestinal complications (coxibs 1·81, 1·17-2·81, p=0·0070; diclofenac 1·89, 1·16-3·09, p=0·0106; ibuprofen 3·97, 2·22-7·10, p<0·0001; and naproxen 4·22, 2·71-6·56, p<0·0001). INTERPRETATION: The vascular risks of high-dose diclofenac, and possibly ibuprofen, are comparable to coxibs, whereas high-dose naproxen is associated with less vascular risk than other NSAIDs. Although NSAIDs increase vascular and gastrointestinal risks, the size of these risks can be predicted, which could help guide clinical decision making. FUNDING: UK Medical Research Council and British Heart Foundation.