The social and economic characteristics of geographic areas are associated with their suicide rates. The extent to which these ecological associations are due to the characteristics of the people living in the areas (compositional effects) or the influence of the areas themselves on risk (contextual effects) is uncertain. Denmark's Medical Register on Vital Statistics and its Integrated Database for Longitudinal Labour Market Research were used to identify suicides and 20 matched controls per case in 25-60-year-old men and women between 1982 and 1997. Individual and area (municipality) measures of income, marital and employment status were obtained. There were 9011 suicides and 180,220 controls. Individual-level associations with these risk factors were little changed when controlling for contextual effects. In contrast, ecological associations of increased suicide risk with declining area levels of employment and income and increasing proportions of people living alone were much attenuated after controlling for compositional effects. We found no consistent evidence that associations with individual-level risk factors differed depending on the areas' characteristics (cross-level interactions). This analysis suggests the ecological associations to be attributed to characteristics of the residents rather than area influences on risk.