TORONTO -- Ontario's top court sided with the provincial government Wednesday in a legal battle over the size of Toronto's council, firmly establishing a reduced 25-ward electoral map for the city's looming municipal vote.

In suspending what it called a "dubious" lower court ruling that found the province's move to cut council unconstitutional, the Court of Appeal for Ontario also did away with the Progressive Conservative government's need to rush through reintroduced legislation on the matter.

That new legislation has drawn heavy criticism for invoking a constitutional provision known as the notwithstanding clause to ensure its passage, but the government said it now won't move forward with the bill.

"I'm feeling real positive," said Premier Doug Ford, who was in Washington for a briefing on NAFTA talks when the ruling was delivered. "I'm very grateful for the court's decision."

Toronto Mayor John Tory said while the court decision was not what the city sought, it does bring clarity for the time being.

"I have opposed, and continue to oppose, the provincial government's actions. They are unfair, they are unnecessary, and they are unprecedented," he said. "You don't just change the rules of an election in the middle of the election, and you shouldn't be surprised when your recklessness causes chaos and confusion."

When asked whether the city would take the issue to the Supreme Court of Canada, Tory said city lawyers have been given the authority to take whatever steps are needed to fight the council cut.

The province had argued that a stay -- which allows city staff to abandon the 47-ward council model revived by the lower court ruling -- was necessary to eliminate uncertainty surrounding the upcoming Oct. 22 election.

The Appeal Court agreed.

"It is not in the public interest to permit the impending election to proceed on the basis of a dubious ruling that invalidates legislation duly passed by the legislature," the three-judge panel wrote.

The panel rejected arguments from those opposed to the stay that the province was responsible for the chaos surrounding the election and thus shouldn't be granted relief.

An Ontario judge last week found that the province's Bill 5, which reduced Toronto council to 25 seats from 47 in the middle of the election campaign, violated freedom of expression rights for candidates and voters.

Ford contested the ruling and took the unprecedented step of invoking the notwithstanding clause in reintroduced legislation to push through with his plan.

The move was publicly condemned by hundreds of legal professionals and several high-profile politicians, including some who negotiated the clause's inclusion in the constitution. Legislators were also heckled by protesters during discussions on the bill, even at a rare overnight sitting held to fast-track its passing.

The new bill was expected to be up for a final vote on Thursday, but the province said it would be "moving on to other priorities" in light of the stay.

"It is time to put the political games behind us," said Municipal Affairs Minister Steve Clark. "We will continue working with the Toronto city clerk to provide every support possible to help with the administration of the election on Oct. 22."

The province is still appealing the lower court ruling, and lawyers said that case could be heard on an expedited basis to resolve the issue before a new council is sworn in on Dec. 1.

In their decision Wednesday, the judges weighing the stay said they believe the lower court decision to strike down Bill 5 will likely be overturned on appeal.

"The question for the courts is not whether Bill 5 is unfair but whether it is unconstitutional," they wrote. "We have concluded that there is a strong likelihood that application judge erred in law and that the Attorney General's appeal to this court will succeed."

The province's plan "unquestionably" disrupted campaigns already underway, but did not restrict the messages candidates could convey in the remaining time before the election, nor did it cancel the messages they expressed earlier, though it may have reduced their effectiveness, the judges said.

"While the change brought about by Bill 5 is undoubtedly frustrating for candidates who started campaigning in May 2018, we are not persuaded that their frustration amounts to a substantial interference with their freedom of expression," they said.

"The candidates were and are still free to say what they want to say to the voters."

Though the legal battle isn't over yet, getting the stay is a political win for the Ford government, said Andrew McDougall, a lecturer at the University of Toronto who specializes in federalism and constitutional law.

"This is kind of ideal for the Ford government because ... their use of the notwithstanding clause, I don't think they anticipated it would have quite the backlash that it did and this offers a great face-saving way to sort of back away from that," he said.

It's unclear what impact the province's planned use of the notwithstanding clause will have, he said.

"By kind of breaking the taboo on using it, maybe it'll be more easy to use the notwithstanding clause going forward," he said.

"Another view might be that having now sort of threatened to use it, going through the political controversy of it and then backing away from it may actually ... have the opposite result, which is that it kind of reinforces the status quo that this is not a clause to be used lightly."

Critics said there would likely be more legal challenges to the council-cutting plan.

"There is a question of legitimacy hanging over the Toronto election even with the Court of Appeal decision on Bill 5," said Green party leader Mike Schreiner.

"Even though Bill 5 might be legal, it is not right."

NDP Leader Andrea Horwath says the Tories' legal victory doesn't quell concerns about the government's behaviour.

"We still have a premier that behaves on a whim for his own personal reasons," she said. "Regardless of what happened this morning in terms of the stay, these things all remain the case."

Judges grant Ontario stay in Toronto council fight by CTV News on Scribd