TORONTO -- Ontario's governing Liberals are axing a controversial law that has outraged public school teachers, just a few days before the party is set to choose a new premier.

The change, which will take effect on Wednesday, comes only four months after the law was passed.

Bill 115 allowed the cash-strapped Liberals to impose contracts on about 126,000 teachers and education workers across the province earlier this month, which froze the wages of most teachers and cut their benefits.

The legislation sparked a major protest by teachers' unions after it was passed in September, resulting in rotating one-day strikes by elementary teachers and the withdrawal of extracurricular activities by high school teachers.

Education Minister Laurel Broten, who promised to kill the legislation after imposing the contracts on Jan. 3, said repealing the law will remove what became a lightening rod in the province's labour battle with teachers.

The contracts allow the government to fight a $14.4-billion deficit while keeping class sizes small and roll out full-day kindergarten for four- and five-year-olds, she added.

"Bill 115 allowed us to do that," she said. "We've done that. We no longer need the Act."

It also alienated a powerful group that's helped the Liberals get re-elected over the last nine years. Making the law history before the Liberal leadership convention on Jan. 25-27 may help the party press the reset button with teachers and give the winner a clean slate as premier.

It could also clear the decks for the departure of Ontario's self-described "education premier," Dalton McGuinty.

But Broten insisted the legislation is only being axed because it has served its purpose, and expressed hope that teachers will return to providing extracurricular activities as well as other volunteer work.

"I think teachers want to move forward and want to continue to do what's best for their students, including extracurricular activities," she said.

"By moving to repeal the Act, the government is promoting goodwill and stability in Ontario schools, and we hope that we will see (the unions') leadership allow their teachers to provide extracurriculars."

In a statement Monday night, the Elementary Teachers' Federation of Ontario called the government's intent to repeal Bill 115 "a meaningless gesture and shallow response to the chaos it has created in schools."

"The premier and education minister are deluding themselves if they think the repeal of Bill 115 will promote goodwill and stability in the education sector and restore their popularity," said ETFO president Sam Hammond.

"They used the bill and are now trying to make it disappear in the most crass of political acts," Hammond added.

ETFO members were set to stage a one-day walkout in protest of the forced contracts on Jan. 11, until the government took it to the Ontario Labour Relations Board, which deemed it an illegal strike.

Several unions, including ETFO and the Ontario Secondary School Teachers' Federation, have already put the wheels in motion to fight the legislation in court, calling it unconstitutional and a violation of their right to strike.