BACKGROUND: Most deaths from coronary heart disease occur out of hospital. Hospital patients face social, age, and sex inequalities. Our aim was to examine inequalities and trends in out-of-hospital cardiac deaths. METHODS: We used the Scottish record linked database to identify all deaths from acute myocardial infarction that occurred in Scotland (population 5.1 million), in 1986-95. We have compared population-based death rates for men and women across age and social groups. FINDINGS: Between 1986 and 1995, 83365 people died from acute myocardial infarction, out of hospital and without previous hospital admission (44655 men, 38710 women); and 117749 were admitted with a first acute myocardial infarction, of whom 37020 died within 1 year. Thus, out-of-hospital deaths accounted for 69.2% (95% CI 69.0-69.5) of all 120385 deaths. Out-of-hospital deaths, measured as a proportion of all acute myocardial infarction events (deaths plus first hospital admissions), increased with age, from 20.1% (19.2-21.0) in people younger than 55 years, to 62.1% (61.3-62.9) in those older than 85 years. Population-based out-of-hospital mortality rates fell by a third in men and by a quarter in women. Mean yearly falls were larger in people aged 55-64 years (5.6% per year in men, 3.7% in women), than in those older than 85 years (2.5% in men and women). Mortality rates were substantially higher in deprived socioeconomic groups than in affluent groups, especially in people younger than 65 years. INTERPRETATION: These inequalities in age, sex, and socioeconomic class should be actively addressed by prevention strategies for coronary heart disease.