"We vetted this upside down, sideways, backwards," Ford told reporters at the time. "When we heard this decision, do you know how many people fell out of their chairs?"

Ontario immediately moved to appeal the ruling and also tabled Bill 31, adding the notwithstanding clause so that it could not be challenged in court on certain constitutional grounds.

The judges at appeal court agreed with Ontario's position that the Superior Court judge made a mistake.

"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 judges wrote in their decision.

MPPs worked overnight on Sunday, from midnight until past 6 a.m., to push Bill 31 through mandatory hours of debate. Protesters inside and outside the chamber slammed Ford's use of the notwithstanding clause.

Police block a doorway as protesters demand entry to Queens Park after the public gallery was cleared and closed to onlookers as the Ontario legislature holds a midnight session to debate a bill that would cut the size of Toronto city council from 47 representatives to 25, in Toronto on Sept. 17, 2018.

Debates on multiple bills to cut Toronto city council have been "wasteful," Opposition leader Andrea Horwath said during question period Wednesday.

"When we debate bills we're supposed to ask the tough questions," Horwath said. "Unfortunately for this government the standard seems to be, 'Can we get away with this?'"

Ontario's Progressive Conservative government has argued that Toronto city council is dysfunctional and unable to pass policies that would provide good public transit and affordable housing. A 25-councillor government will be able to make decisions more easily, the government has said.

Ford says the move will save Toronto taxpayers $25 million over four years. He declined to tell reporters how much it costed to staff Queen's Park for extra debates on Saturday afternoon and Sunday night.