To determine the risk of developing a first myocardial infarction after a hysterectomy and/or oophorectomy. Case-cohort analysis performed among 17,126 women in the Uppsala Health Care Region of Sweden, who had undergone a hysterectomy and/or oophorectomy in 1965 to 1983. Record linkage was used for follow-up and medical records to ascertain the actual history of oophorectomy. Risk estimates were calculated by relating the observed number of cases in the cohort to that expected on the basis of incidence rates in the population. Overall, 214 cases of myocardial infarction were observed. In premenopausal women a bilateral oophorectomy alone tended to increase the relative risk 1.6; 95% CI 0.8-3.1, but this operation combined with hysterectomy increased the risk only among those aged 50 and over at surgery. Hysterectomy at premenopausal age or unilateral oophorectomy did not alter the risk of myocardial infarction. In naturally menopausal women, hysterectomy-mainly for uterine myoma-was associated with a four-fold increase in relative risk (3.8; 95% CI 1.9-7.8). Hysterectomy for treatment of myoma performed after a natural menopause is linked to an excess risk for myocardial infarction. Bilateral oophorectomy before menopause may increase the risk of myocardial infarction.