The Quebec Court of Appeal has overturned a lower court decision to prevent the province's doctor-assisted dying law from coming into effect.

The law, which dictates how terminally ill patients can end their lives with a doctor's help, was supposed to come into effect Dec. 10, but has been mired in confusion for weeks.

The Coalition of Physicians for Social Justice along with Lisa D'Amico, a woman with cerebral palsy, filed for an injunction in November. They argued that Quebec's law should not be implemented because it would violate a timeline created by the Supreme Court of Canada when it overturned a federal law banning doctor-assisted death, deeming it unconstitutional.

The Supreme Court struck down the federal law in February. In its decision on Carter v. Canada, the top court gave the federal government a year, until Feb. 6, 2016, to come up with new legislation.

The group seeking the injunction wanted certain parts of Quebec's law suspended until the federal government changes the Criminal Code, arguing that until then, some aspects of the practice are still illegal.

When it granted the injunction, the lower court ruled that the Criminal Code took precedence over the Quebec law and interpreted the grace period as a period of time during which the federal law was still in effect.

But the province launched an appeal, and on Tuesday the appellate court refuted that argument, saying the grace period only serves to give the federal and provincial governments time to figure out how they will proceed. Quebec's law, then, fills a judicial void that was left when the top court made its decision earlier this year.

“I think we were on sound ground and clearly we are. The ruling that came in this morning is clear on that,” said Quebec Health Minister Gaetan Barrette.

The three judges from the Court of Appeal say that Quebec's Right to Die law can coexist with federal laws because the Supreme Court has already ordered Ottawa to modify its own laws to make way for end-of-life procedures.

“I think [the decision] recognizes the incredibly hard work that Quebec did to prepare for the circumstances for assisted dying to be legal and it recognizes the vacuum that's been left by the federal government and … the result is we're not going to let people suffer as a result of a lack of action by the federal government,” said Jocelyn Downie, professor of law and medicine at Dalhousie University.

Barrette said Tuesday’s ruling protects doctors from being prosecuted.

“Doctors cannot be sued for medical aid in dying. It is with this ruling totally, absolutely impossible,” he said.

The federal Liberals have asked for a six-month extension on the top court's deadline. The Supreme Court will hear oral arguments for the extension Jan. 11.

In a statement, a spokesperson for federal Justice Minister Jody Wilson-Raybould said the department is "carefully reviewing" the details of Tuesday's decision and that it will work with provinces and territories to come up with a uniform law addressing assisted death.

The ruling is a major loss for doctors who opposed the bill on a matters of principle, arguing that doctors are there to save lives, not end them.

“We should not inject, we should not refer. This is not medical practice, this is not good quality care. This is dangerous. This goes against all good medical care when you can offer someone a better care,” said family physician Dr. Paul Saba, instrumental in the fight against the law.

Quebec was the first province to pass right-to-die legislation, a bill that was introduced by PQ MNA Veronique Hivon in 2013 and passed the following year.

The province has maintained it believes its law concerns end-of-life care, which is a health issue and therefore provincial jurisdiction.

Hivon said she understands that it's impossible to please everyone, as this is a very controversial issue, but she still believes this bill offers something for those who are at the end of their lives and suffering.

"Today is a very emotional day, it's an emotional feeling because we've worked on this with so many people, and for once the elected members of the National Assembly were able to work together in a non-partisan manner," she said.

The law allows doctors to administer a lethal injection only if a person is mentally fit, with an incurable illness, in unbearable physical and/or psychological pain and in an advanced state of irreversible decline.

Patients can change their mind at any time, and doctors have the right to refuse to administer lethal drugs for moral or ethical reasons.

The next phase of the debate will now take place in 2016, when Ottawa introduces its own right-to-die legislation, which is expected to be influenced by Tuesday's judgment.

Quebec v D'Amico decision