The Portuguese parliament has approved a law authorising "medically assisted death" which would make the Catholic country the fourth in Europe to legalise euthanasia should the new law come into force.
The bill, which was approved by 136 votes in favour to 78 against, with four abstentions, will be presented to the newly re-elected conservative President Marcelo Rebelo de Sousa.
He faces the choice of giving it assent, sending it for examination by the Constitutional Court, or using his veto.
Lawmakers approved the final wording for legislation allowing euthanasia and physician-assisted suicide for terminally ill and gravely injured people.
After their passage, and in accordance with parliamentary procedure, the bills went through committees where administrative procedures and other details of the euthanasia process were set out and merged into a single piece of legislation.
Portugal’s Constitution states that human life is “sacrosanct,” though abortion has been legal in the country since 2007.
The president must make his decision in the coming weeks. Parliament can override a presidential veto by voting a second time for approval.
Euthanasia is when a doctor directly administers fatal drugs to a patient, while medically-assisted suicide is when patients administer the lethal drug themselves, under medical supervision.