“Y OU KNOW ,” says a trader in “Margin Call”, a film about the crash of 2008, as he stands high on a building above Wall Street, “the feeling that people experience when they stand on the edge like this isn’t the fear of falling—it’s the fear that they might jump.” Suicide fascinates us. It is at once appalling and yet, in the darkest places in our minds, appealing. It is the most damaging sort of death. A child’s suicide is a parent’s worst nightmare, and a parent’s marks their children for life. It is a manifestation not just of individual anguish but also of a collective failure: if society is too painful to live in, perhaps we are all culpable.

The suicide rate in America is up by 18% since 2000. This is not merely a tragedy; it matters politically, too. The rise is largely among white, middle-aged, poorly educated men in areas that were left behind by booms and crushed by busts. Their deaths are a symptom of troubles to which some see President Donald Trump as the answer. Those troubles should not be ignored.

Nonetheless, beyond America’s gloomy trend is a more optimistic story: that at a global level, suicide is down by 29% since 2000 (see article). As a result, 2.8m lives have been saved in that time—three times as many as have been killed in battle. There is no one reason. It is happening at different rates among different groups in different places. But the decline is particularly notable among three sets of people.

One is young women in China and India. In most of the world, older people kill themselves more often than the young, and men more than women. But in China and India, young women have been unusually prone to suicide. That is decreasingly the case. Another group is middle-aged men in Russia. After the collapse of the Soviet Union, alcoholism and suicide rocketed among them. Both have now receded. A third category is old people all around the world. The suicide rate among the elderly remains, on average, higher than among the rest of the population, but has also fallen faster since 2000 than among other groups.

Why are these people now less likely to take their own lives? Urbanisation and greater freedom have helped. Accounts of those who attempt suicide, and of the relatives of those who succeed, suggest that many young Asian women were driven to despair by violent husbands and overbearing in-laws. As people move to cities and the grip of tradition loosens, women have more choice about whom they marry or live with, making life more bearable. Leaving the village helps in another way, too. Because farming involves killing things, rural folk are likelier to have the means to kill themselves—guns, pesticides—to hand.

Social stability is also a factor. In the turbulence that followed the collapse of the Soviet Union, many middle-aged people saw their sources of income and status collapse. Unemployed people kill themselves at around two-and-a-half times the rate of those in work. The financial crash of 2007-08 and the resulting recessions are reckoned to have caused an extra 10,000 or so suicides in America and western Europe. As crises recede and employment rises, so suicide tends to ebb. And falling poverty rates among the old, which have declined faster than among other groups globally, are reckoned to have contributed to the drop in the number of elderly suicides.

But the decline is not just the consequence of big social trends. Policy plays a role, too. When Mikhail Gorbachev restricted the production and distribution of booze in the mid-1980s, both drinking and suicide fell sharply. The collapse of the Soviet Union swept those regulations aside, and both drinking and suicide shot up again. Restrictions introduced by Vladimir Putin in 2005 are reckoned to have contributed to the recent decline.

Governments can also help limit the consequences of social and economic turbulence. Active labour-market policies, which help re-train jobless workers and ease them back into work, prevent many suicides. And spending on health services, especially those that most benefit the old and sick, can make a big difference: fear of chronic pain is one of the things that leads people to seek a quick way out. The remarkable recent fall in suicide among elderly Britons may have happened in part because Britain’s palliative-care system is the best in the world.

Efforts to curb access to the means to kill oneself can help, too. Suicide is surprisingly impulsive. A study of young Chinese women who had tried to kill themselves showed that three-fifths had been contemplating suicide for less than two hours, and one in ten for less than a minute. Of 515 people who had survived the leap from San Francisco’s Golden Gate bridge between 1937 and 1971, 94% were still alive in 1978—which suggests that a suicide postponed is likely to be a suicide prevented.

Governments can do a lot to put self-slaughter a little further out of reach. The most toxic pesticides account for one-seventh of suicides. When South Korea outlawed paraquat in 2011, it saw a decline in suicides but no drop in agricultural output. Requiring potentially lethal medicines to be sold only in small quantities, as some countries have done with aspirin and paracetamol, has also been shown to help. But the most effective measure of all is limiting access to guns. Half of all Americans who commit suicide shoot themselves, and the overall rate in America is about twice that in Britain, which has strict gun controls. The difference in gun ownership largely accounts for the state-by-state variation in suicide rates.

The media can also do their bit. Suicide is strangely contagious. When Robin Williams, an actor, killed himself in 2014, his method and motives were reported in great detail. Researchers calculated that there were 1,800 more suicides than would otherwise have been expected in the next four months, often using the same method. Journalists should cover such tragedies in less detail, and with more restraint.

For a few people—those who are terminally ill, in severe pain and determined to die—suicide may be the least terrible option. In such circumstances, and with firm safeguards, doctors should be allowed to assist. But many of the 800,000 people who kill themselves each year act in haste, and more could be saved with better health services, labour-market policies and curbs on booze, guns, pesticide and pills. America, in particular, could spare much pain by learning from the progress elsewhere.