The risks and benefits of coxibs, non-steroidal anti-inflammatory drugs (NSAIDs), and aspirin treatment are under intense debate. To determine the risk of peptic ulcer upper gastrointestinal bleeding (UGIB) associated with the use of coxibs, traditional NSAIDs, aspirin or combinations of these drugs in clinical practice. A hospital-based, case-control study in the general community of patients from the National Health System in Spain. The study included 2777 consecutive patients with endoscopy-proved major UGIB because of the peptic lesions and 5532 controls matched by age, hospital and month of admission. Adjusted relative risk (adj RR) of UGIB determined by conditional logistic regression analysis is provided. Use of non-aspirin-NSAIDs increased the risk of UGIB (adj RR 5.3; 95% confidence interval (CI) 4.5 to 6.2). Among non-aspirin-NSAIDs, aceclofenac (adj RR 3.1; 95% CI 2.3 to 4.2) had the lowest RR, whereas ketorolac (adj RR 14.4; 95% CI 5.2 to 39.9) had the highest. Rofecoxib treatment increased the risk of UGIB (adj RR 2.1; 95% CI 1.1 to 4.0), whereas celecoxib, paracetamol or concomitant use of a proton pump inhibitor with an NSAID presented no increased risk. Non-aspirin antiplatelet treatment (clopidogrel/ticlopidine) had a similar risk of UGIB (adj RR 2.8; 95% CI 1.9 to 4.2) to cardioprotective aspirin at a dose of 100 mg/day (adj RR 2.7; 95% CI 2.0 to 3.6) or anticoagulants (adj RR 2.8; 95% CI 2.1 to 3.7). An apparent interaction was found between low-dose aspirin and use of non-aspirin-NSAIDs, coxibs or thienopyridines, which increased further the risk of UGIB in a similar way. Coxib use presents a lower RR of UGIB than non-selective NSAIDs. However, when combined with low-dose aspirin, the differences between non-selective NSAIDs and coxibs tend to disappear. Treatment with either non-aspirin antiplatelet or cardioprotective aspirin has a similar risk of UGIB.