If the legislation is passed, Scotland would join other countries such as Switzerland, Canada, New Zealand, Austria and Ecuador in allowing assisted dying in certain circumstances.

The Assisted Dying for Terminally Ill Adults (Scotland) Bill would give mentally competent adults who have been diagnosed with a terminal condition the right to end their life.

The legislation would include safeguards such as independent assessments by two doctors and a 14-day cooling-off period. There would be a requirement for those requesting an assisted death to have lived in Scotland for at least a year.

Individuals would need to self-administer the substance that will end their life.

The plan was put forward in a private members' bill by Liam McArthur, a Liberal Democrat member of the Scottish parliament, who this week said that he "absolutely convinced" the legislation will be passed because there is growing public support for the policy.

A survey by the campaign group Dignity in Dying, which campaigns in favour of legalisation, found that more than three quarters of Scots were in favour of the policy.

Opponents of the legislation said the poll does not reflect the change in attitudes once the dangers are highlighted.

A vote in Scotland's devolved parliament on the legislation is not expected for at least several months.

Scotland's semi-autonomous government, which has control over areas such as healthcare, education and some taxation, has in the past diverged on policy from the three other countries in the United Kingdom - England, Wales and Northern Ireland.

For example, Scotland set up Britain's first official supervised drug consumption room in an attempt to reduce infectious diseases and overdoses.

Britain's Labour leader Keir Starmer, who polls predict will be the next prime minister, has said he wants assisted dying to be legalised after the next election.

(Reporting by Andrew MacAskill; Editing by Angus MacSwan)

By Andrew MacAskill