A NNA HAS just hit puberty and she can barely move. She has late-stage cancer and a tumour protrudes from her neck. As a nurse walks in, Anna (not her real name) slowly covers her face with a veil. She is dying in agony in Dantec, one of Senegal’s main hospitals. But the doctors don’t have enough morphine to give her.

In west Africa there are just 52 palliative-care centres such as hospices for about 360m people. Many of these do not have enough drugs. In Senegal the average patient who needs it gets 13mg of morphine a year, compared with 55,704mg in America. Across sub-Saharan Africa nine-tenths of cancer sufferers in moderate or severe pain die without the relief granted by opioids.

Providing palliative care without morphine is like “driving a car without fuel”, says Emmanuel Luyirika, of the Kampala-based African Palliative Care Association in Uganda. It is also unnecessary, because opioids are cheap. Providing pain relief for their populations can cost governments as little as $2-16 per person each year, according to a study commissioned by the Lancet.

The morphine shortage stems from bad policies. In the 1980s and 1990s, as part of its “war on drugs”, America cut aid and imposed sanctions on countries that were not tough enough on trafficking. It listed Nigeria as unco-operative from 1994 to 1998 (during a criminal dictatorship), suspended military aid and blocked loans.

There is little threat of being penalised today. But taboos about opioid use, restrictions on prescriptions and import barriers are still in place across much of Africa, says Barbara Goedde at the Global Commission on Drug Policy. In 2012, although some 200,000 Nigerians died of AIDS -related causes, often in severe pain, the country imported no morphine and said there was no need for it.

Yet much of this pain can be eased. Consider Uganda. Four-fifths of its districts have at least one palliative-care service. Over 200 hospitals have in-patient palliative-care units. In 2015 the Economist Intelligence Unit, a sister company of The Economist, ranked palliative-care systems on measures including training and access to drugs. Uganda scored higher than richer countries such as Malaysia and Hungary.

There are several reasons for Uganda’s success. The first is its adoption of oral morphine, a cheap and effective painkiller. This was brought to the country in 1993 by Hospice Africa, a non-profit outfit. For 17 years its staff mixed the solution “at the kitchen sink”, says Anne Merriman, the British doctor behind it. She met scepticism at first; some senior doctors said she was promoting euthanasia. Morphine still runs short; only 11% of need is met but its use has become normal. One cancer patient in Kampala keeps his bottle by the stove, next to the hot chocolate.

The second reason for Uganda’s success is that nurses are allowed to prescribe morphine. That is crucial because there is just one doctor for every 11,000 people. And the third reason is government support. Officials see morphine as a useful painkiller rather than a shameful recreational drug. Since 2011 the government and Hospice Africa have produced oral morphine in a public-private partnership. Patients get it free. The solution, dyed to show different strengths, is too diluted to interest addicts.

Esther Akongo lives with her sister in a gloomy single-room house in Kampala. Both have cancer. Since getting morphine, says Ms Akongo, she can at last get a good night’s sleep. But the happiest times are the regular trips to the hospice, where she can talk to other patients. Morphine brings respite; friendship brings joy.