Compared with other countries of the developed world, Britain scores below par on many aspects of modern living, from the football World Cup to cancer treatment.

When it comes to dying, however, we are without equal. The UK has been ranked top of the "Quality of Death" index for its provision of end-of-life care.

The index, drawn up by the Economist Intelligence Unit (EIU), ranks 40 countries on attitudes to death and the treatment of the dying. The UK takes the top place based on its network of hospices, NHS provision of palliative care and measures such as access to pain killing drugs.

While much attention has been given to quality of life, less has been paid to quality of death. Too many people suffer poor quality deaths, even in countries that boast excellent health systems. Of more than 100 million people around the world who need palliative care annually, fewer than 8 per cent receive it.

The UK's top ranking comes despite its having a "far-from-perfect health system", the report says. Many comparable rich nations lag a long way behind, including Denmark (ranked 22nd), Italy (28th) and South Korea (32nd). Some countries have cultural taboos around death, such as China, which inhibits the development of compassionate care. Western societies, where death has become medicalised, often prioritise curative ahead of palliative care, causing needless suffering.

In the US, hospice care is associated with "giving up" and discussion of end-of-life care "often inflames religious sentiment that holds the sanctity of life paramount", it says.

Switzerland ranks 19th in the table, despite what many see as its enlightened attitude to assisted suicide for the terminally ill. But debates around euthansia and assisted suicide affect "only a tiny proportion of the terminally ill" and policies on them are therefore excluded from the index.

Pressure on policy makers can nonetheless be the catalyst for improvements to palliative care services. In Australia the federal government overturned a euthansia law in the Northern Territory in 1996, but this was followed by a boost to national funding for end-of-life care.

One of the biggest obstacles to a "quality death" is the lack of powerful pain killing drugs such as morphine. Misplaced fears about addiction, illicit drug use and trafficking seriously restrict their availability.

Help the Hospices, the UK's leading charity supporting hospice care, welcomed the report but said too many people in Britain faced the end of life without specialist care and support.

David Praill, the chief executive, said: "This is the first time a ranking of end-of-life care globally has been attempted. Hospice care was pioneered in the UK and it is heartening to see the UK coming top of the index."

"Our ageing population means more people will be dying and they will be dying with more complex needs... It is vital we have a fair and sustainable system of funding that meets the needs of people at the most vulnerable time of their lives."