MONTREAL -- Liberal Leader Justin Trudeau says that, if re-elected, he would expand Canadians' eligibility for medically assisted dying with legislation that comes into line with a recent court ruling.

"When it comes to an issue that is so important, so delicate, so difficult for so many families, the government needs to make sure we're getting the balance right," Trudeau said Thursday.

A Quebec Superior Court judge invalidated sections of the federal and Quebec laws on medically assisted dying last month, ruling that they were too restrictive and therefore unconstitutional.

Trudeau said the Liberals would review the court decision to see how the law could be improved upon, stressing a "balance between protecting the most vulnerable and making sure people's rights and choices are respected."

"We recognize that court cases would come in, that people would be evolving as a society," Trudeau told reporters at a Montreal campaign stop in the riding of Outrement. "We will move forward in a responsible way with legislation that responds to that."

The judge invalidated a Criminal Code requirement that a natural death be "reasonably foreseeable" before someone can be eligible for assisted death. The condition has prevented some people from accessing the end-of-life procedure.

She also invalidated a section of the Quebec law that says people must "be at the end of life."

The decision, part of a larger societal debate, means that more people will be able to get help from a doctor to end their lives.

Trudeau said Wednesday night the government would not appeal the ruling.

Conservative Leader Andrew Scheer reiterated Thursday he would do the opposite, though the deadline to appeal will have already passed by the time the time Parliament reconvenes after the Oct. 21 election.

"I voted against the current government's legislation, because I did not believe that it had enough safeguards in it. And now with this ruling, I think it's best that we appeal it to the Supreme Court so we can get certainty...for the framework within which a parliament can legislate," Scheer said.