Portugal has taken a big step towards legalising euthanasia by approving proposals from the ruling Socialist Party and some other politicians.
Five bills got majority backing from MPs, and now a special committee is to consolidate them into one bill. The country's president can still veto it.
The Catholic Church and opposition parties oppose euthanasia. They want Portugal to hold a referendum on it.
Euthanasia means deliberately ending the life of a patient who is suffering.
It involves a doctor taking an active role in ending a patient's life, whereas assisted death means enabling a patient to take a lethal dose themselves.
There is also passive euthanasia, where death is brought about by an omission - by withdrawing or withholding treatment in order to let the person die.
Portugal's parliament narrowly rejected a move to legalise euthanasia in 2018, but the Socialists' majority now makes it more likely that the law will get through this time.
The Catholic Church and other conservative opponents in Catholic-majority Portugal say MPs should put their efforts instead into improving healthcare for the terminally ill. Anti-euthanasia protesters rallied outside parliament on Thursday, as MPs debated the bills.
All the parties behind the bills agreed on strict conditions for euthanasia to take place - a patient must be over 18, not suffering from a mental illness, and the request can be granted only if the patient is terminally ill and suffering unbearable pain, Reuters news agency reported.
Under English law euthanasia is illegal and is considered manslaughter or murder.
It is fully legal in three European countries: Belgium, Luxembourg and the Netherlands. But assisted death and passive euthanasia - of various types - are legal in many more European countries.