IT IS easy to forget that adultery was a crime in Spain until 1978; or that in America, where gay marriage is allowed by 37 states and may soon be extended to all others by the Supreme Court, the last anti-sodomy law was struck down only in 2003. Yet, although most Western governments no longer try to dictate how consenting adults have sex, the state still stands in the way of their choices about death. An increasing number of people—and this newspaper—believe that is wrong.

The argument is over the right to die with a doctor’s help at the time and in the manner of your own choosing. As yet only a handful of European countries, Colombia and five American states allow some form of doctor-assisted dying. But draft bills, ballot initiatives and court cases are progressing in 20 more states and several other countries (see article). In Canada the Supreme Court recently struck down a ban on helping patients to die; its ruling will take effect next year. In the coming months bills will go before parliaments in Britain and Germany.

The idea fills its critics with dismay. For some, the argument is moral and absolute. Deliberately ending a human life is wrong, because life is sacred and the endurance of suffering confers its own dignity. For others, the legalisation of doctor-assisted dying is the first step on a slippery slope where the vulnerable are threatened and where premature death becomes a cheap alternative to palliative care.

These views are deeply held and deserve to be taken seriously. But liberty and autonomy are sources of human dignity, too. Both add to the value of a life. In a secular society, it is odd to buttress the sanctity of life in the abstract by subjecting a lot of particular lives to unbearable pain, misery and suffering. And evidence from places that have allowed assisted dying suggests that there is no slippery slope towards widespread euthanasia. In fact, the evidence leads to the conclusion that most of the schemes for assisted dying should be bolder.

Nothing is hurt, nothing is lost

The popular desire for assisted dying is beyond question. The Economist asked Ipsos MORI to survey people in 15 countries on whether doctors should be allowed to help patients to die, and if so, how and when. Russia and Poland are against, but we find strong support across America and western Europe for allowing doctors to prescribe lethal drugs to patients with terminal diseases. In 11 out of the 15 countries we surveyed, most people favoured extending doctor-assisted dying to patients who are in great physical suffering but not close to death.

What do you think of doctor-assisted dying? Take the survey for yourself and compare your answers No wonder that, just as adultery existed in Spain before 1978, so too many doctors help their patients die even if the law bans them from doing so. Usually this is by withdrawing treatment or administering pain-relief in lethal doses. Often doctors act after talking to patients and their relatives. Occasionally, when doctors overstep the mark, they are investigated, though rarely charged. Some people welcome this fudge because it establishes limits to doctor-assisted dying without the need to articulate the difficult moral choices this involves. But this approach is unethical and unworkable. It is unethical because an explicit choice that should lie with the patient is wholly in the hands of a doctor. It is hypocritical because society is pretending to shun doctor-assisted dying while tacitly condoning it without safeguards. What may turn out to be more important, this system is also becoming impractical. Most deaths now take place in hospital, under teams of doctors who are working with closer legal and professional oversight. Death by nods and winks is no good. Better is to face the arguments. One fear is that assisted dying will be foisted on vulnerable patients, bullied by rogue doctors, grasping relatives, miserly insurers or a cash-strapped state. Experience in Oregon, which has had a law since 1997, suggests otherwise. Those who choose assisted suicide are in fact well-educated, insured and receiving palliative care. They are motivated by pain, as well as the desire to preserve their own dignity, autonomy and pleasure in life. Another fear is that assisted dying will downgrade care. But Belgium and Holland have some of the best palliative care in Europe. Surveys show that doctors are as trusted in countries with assisted dying as they are in those without. And there are scant signs of a slippery slope. In Oregon only 1,327 people have received lethal medicine—and just two-thirds of those have used it to take their lives. Assisted dying now accounts for about 3% of deaths in the Netherlands—a large number—but this is less a rush to assisted dying than the coming to light of an unspoken tradition in which doctors quietly brought their patients’ lives to an end.

Wear no forced air of solemnity or sorrow

How, then, should assisted dying work? For many the model is Oregon’s Death with Dignity Act. It allows (but does not oblige) doctors to prescribe lethal drugs to patients with less than six months to live who ask for them, if a second doctor agrees. There is a cooling-off period of 15 days.

We would go further. Oregon insists that the lethal dose is self-administered, to avoid voluntary euthanasia. To the patient the moral distinction between taking a pill and asking for an injection is slight. But the practical consequence of this stricture is to prevent those who are incapacitated from being granted help to die. Not surprisingly, some of the fiercest campaigners for doctor-assisted dying suffer from ailments such as motor neurone disease, which causes progressive paralysis. They want to know that when they are incapacitated, they will be granted help to die, if that is their wish. Allowing doctors to administer the drugs would ensure this.

Oregon’s law covers only conditions that are terminal. Again, that is too rigid. The criterion for assisting dying should be a patient’s assessment of his suffering, not the nature of his illness. Some activists for the rights of the disabled regard the idea that death could be better than a chronic condition as tantamount to declaring disabled people to be of lesser worth. We regard it as an expression of their autonomy. So do many disabled people. Stephen Hawking has described keeping someone alive against his wishes as the “ultimate indignity”.

One exception to this distinction should be children. The decision of whether to endure chronic conditions should be left until adulthood. But, as with adults, children facing imminent death from terminal diseases should, in consultation with their parents and doctors, have the right to be spared their last agonising hours.

The hardest question is whether doctor-assisted dying should be available for those in mental anguish. No one wants to make suicide easier for the depressed: many will recover and enjoy life again. But mental pain is as real as physical pain, even though it is harder for onlookers to gauge. And even among the terminally ill, the suffering that causes some to seek a quicker death may not be physical. Doctor-assisted death on grounds of mental suffering should therefore be allowed.

Because patients’ judgments may be ill-informed and states of mind can change, especially among the mentally ill, society should help people to die only when safeguards are in place. These should include mandatory counselling about alternatives, such as pain relief, psychotherapy and palliative care; a waiting period, to ensure that the intention is enduring; and a face-to-face consultation with a second, independent medical expert to confirm the patient’s prognosis and capacity. In cases of mental suffering the safeguards should be especially strong.

The most determined people do not always choose wisely, no matter how well they are counselled. But it would be wrong to deny everyone the right to assisted death for this reason alone. Competent adults are allowed to make other momentous, irrevocable choices: to undergo a sex change or to have an abortion. People deserve the same control over their own death. Instead of dying in intensive care under bright lights and among strangers, people should be able to end their lives when they are ready, surrounded by those they love.

• Listen to The Economist's editor-in-chief Zanny Minton-Beddoes, Lord Falconer, Baroness Finlay and professor Theo Boer debate the arguments for and against assisted dying with Anne McElvoy