Spain's parliament has voted to approve a bill that will allow physician-assisted suicide and euthanasia for long-suffering patients of incurable diseases or unbearable permanent conditions.
The bill, which was backed by Spain's left-wing coalition government and several other parties, passed in a 198-138 vote. The conservative Popular Party and the far-right Vox party voted "No".
The bill will now continue its legislative journey, facing a vote in the Senate where it is also expected to pass. According to the draft of the law approved by the lower house, it will not go into effect until three months after being published in the government gazette.
Spain is following the footsteps of Iberian Peninsula neighbour Portugal, whose parliament approved similar bills to legalise physician-assisted suicide and euthanasia in February. Those bills have yet to become law and could yet face resistance from Portugal's president.
Euthanasia - when a doctor directly administers fatal drugs to a patient - is legal in Belgium, Canada, Colombia, Luxembourg, the Netherlands and Switzerland. In some US states, medically-assisted suicide - where patients administer the lethal drug themselves, under medical supervision - is permitted.
A small group of people gathered outside Madrid's lower house of parliament waving black flags with skulls and crossbones to protest against the bill.
The law will allow health professionals, both public and private, to assist patients who express their wish to die rather than continue suffering "a serious and incurable disease" or from a "debilitating and chronic condition" the person considers "unbearable".
Patients must ask to die on four different occasions during the process, which can last over a month. The first two requests must be in writing and submitted more than two weeks apart. The patient must reaffirm that request a third time after consulting with a doctor and a fourth time just before undergoing the procedure to end his or her life.
The process must be overseen by a medical team led by a physician and another doctor who acts as an external supervisor. An oversight board in each region must approve requests. The person asking to exercise his or her right to die must be a Spanish citizen or resident, of adult age, and able to make rational decisions.
The law will also allow any medical worker to refuse to participate on grounds of belief.