Quebec's landmark right-to-die bill was adopted by a sweeping margin Thursday, making it the first legislation of its kind in Canada and setting up a potential legal challenge from Ottawa.
Bill 52 carried the day by a 94-22 majority in what was a free vote for members of the National Assembly.
The dissenters were all Liberals.
The legislation is officially dubbed "an act respecting end-of-life care.''
It stipulates that patients themselves would have to repeatedly ask a doctor to end their lives on the basis of unbearable physical or psychological suffering. They would have to be deemed mentally sound at the time of the requests.
The federal government has said it could challenge the legality of the legislation.
Assisted suicide and euthanasia are illegal under Canada's Criminal Code and Ottawa has insisted it has no intention of changing that.
Quebec politicians have argued that delivery of health-care services falls under provincial jurisdiction and has said it is on solid legal footing.
The bill was originally introduced by the previous Parti Quebecois government last year but wasn't passed by the time then-premier Pauline Marois called the April 7 election in early March.
The legislation, which had all-party support, was resurrected when the national assembly resumed sitting following the Liberals' election victory.
The bill had already passed numerous hurdles, including highly divisive public hearings in 2010 and 2011.
A panel of experts then concluded that provinces had the legal jurisdiction to legislate in matters of health.
Their report in 2012 report suggested doctors be allowed in exceptional circumstances to help the terminally ill die if that is what the patients want.
The legislation has three main components — it aims to expand palliative care; sets protocols for doctors sedating suffering patients until they die naturally; and offers guidelines to help patients who want to end their pain.
It refers to medically assisted death with a doctor administering medication to a terminally ill patient if they meet a host of requirements, including filling out a consent form and gaining the written approval of two doctors.