STUDY OBJECTIVE: To describe the association between labour market status and death by suicide with focus on admission with a psychiatric disorder. DESIGN: Nested case-control study. Data from routine registers. SETTING: Entire Danish population. PARTICIPANTS: 9011 people aged 25-60 years who committed suicide during 1982-1997 and 180 220 matched controls. MAIN RESULTS: In the general population, not being fully employed is associated with a twofold to threefold increased relative risk of death by suicide, compared with being fully employed. In contrast, fully employed people who have been first admitted to a psychiatric hospital within the past year are at increased suicide risk. Patients who are unemployed, social benefits recipients, disability pensioners, or otherwise marginalised on the labour market have a suicide risk of 0.60 (95% CI: 0.46 to 0.78), 0.41 (0.23 to 0.74), 0.70 (0.45 to 1.08), and 0.86 (0.53 to 1.41), respectively. Although a similar risk decrease is found in women, men, people younger than 30 years, people older than 45 years, and in people who become unemployed, the reversed effect attenuates with time since admission, and little association is seen when a marginal structural model is applied. CONCLUSIONS: Although the results show an increased suicide mortality associated with unemployment and labour market marginalisation in the general population, the results suggest little or an inverse association between unemployment and suicide in people with psychiatric illness. The associations seen suggest the need to consider healthy worker selection effects when studying the causal pathway from unemployment and psychiatric illness to suicide.