To describe the clinical circumstances in which psychiatric patients commit suicide. National clinical survey. England and Wales. A two year sample of people who had committed suicide, in particular those who had been in contact with mental health services in the 12 months before death. Proportion of suicides in people who had had recent contact with mental health services; proportion of suicides in inpatients; proportion of people committing suicide and timing of suicide within three months of hospital discharge; proportion receiving high priority under the care programme approach; proportion who were recently non-compliant and not attending. 10 040 suicides were notified to the study between April 1996 and March 1998, of whom 2370 (24%; 95% confidence interval 23% to 24%) had had contact with mental health services in the year before death. Data were obtained on 2177, a response rate of 92%. In general these subjects had broad social and clinical needs. Alcohol and drug misuse were common. 358 (16%; 15% to 18%) were psychiatric inpatients at the time of death, 21% (17% to 25%) of whom were under special observation. Difficulties in observing patients because of ward design and nursing shortages were both reported in around a quarter of inpatient suicides. 519 (24%; 22% to 26%) suicides occurred within three months of hospital discharge, the highest number occurring in the first week after discharge. 914 (43%; 40% to 44%) were in the highest priority category for community care. 488 (26% excluding people whose compliance was unknown; 24% to 28%) were non-compliant with drug treatment while 486 (28%; 26% to 30%) community patients had lost contact with services. Most people who committed suicide were thought to have been at no or low immediate risk at the final service contact. Mental health teams believed suicide could have been prevented in 423 (22%; 20% to 24%) cases. Several suicide prevention measures in mental health services are implied by these findings, including measures to improve compliance and prevent loss of contact with services. Inpatient facilities should remove structural difficulties in observing patients and fixtures that can be used in hanging. Prevention of suicide after discharge may require earlier follow up in the community. Better suicide prevention in psychiatric patients is likely to need measures to improve the safety of mental health services as a whole, rather than specific measures for people known to be at high risk.