TORONTO — A calm end to the spring legislative session at noon Thursday erupted into threats of an election from Premier Dalton McGuinty by the end of the day after the Tories and NDP combined to force changes to the government's budget bill.

After sitting a week longer than planned, the legislature adjourned with an agreement the politicians would return next Wednesday for the vote on the Liberal's budget, which the NDP said they would support to avoid defeating the minority government.

But hours later in committee, the Conservatives and New Democrats started outvoting the Liberals to pass opposition party amendments and -- in McGuinty's words -- "gut the government's budget bill."

The NDP "turned their backs" on their agreement to support the budget in exchange for a tax on incomes over $500,000 and other changes the Liberals made earlier, McGuinty said in a late-day statement.

"The consequences of the NDP's latest backtrack would hurt our economy when what it needs most is stability and certainty," he said.

"(NDP Leader) Andrea Horwath and her party have, for the second time, broken their word about passing this budget."

Horwath said she warned McGuinty from the start the NDP still wanted changes in the budget, adding she was "disappointed" the premier is threatening an election.

"When discussing the Ontario' budget with the Premier, I made it clear that I would not rubber stamp the government's 300-page omnibus bill," Horwath said in a statement.

"I made a commitment to ensure passage of the budget and I will keep my word. I also made a commitment to the people ... to make that bill better at the committee stage. I expect the premier to keep his word."

If the government can't pass the budget as the Liberals and NDP originally agreed, the premier will "take it to the people in a general election," added McGuinty.

"Otherwise, Andrea Horwath breaking her word a second time at this late stage has left us with absolutely no choice -- we will be forced to take this to the people."

McGuinty, who needs the support of only one opposition member to pass the budget, said he'd be happy to work with any Tory or New Democrat who wants to "put the provincial interests ahead of their party's own interest."

Earlier in the day, the Tories made it clear they will vote against the budget, saying it failed to curb government spending or address what they say is Ontario's jobs crisis.

"People sent us here eight months ago after the election to take care of two things: rein in spending so we can balance the books and create good jobs," said Opposition Leader Tim Hudak.

"Sadly we've gone backwards on both those counts."

The budget also calls for a wage freeze for 1.3 million public sector employees, including doctors, nurses and teachers, to help eliminate the $15 billion deficit by 2017-18. The Liberals are trying to negotiate the freeze before resorting to legislation if needed.

Hudak spent the entire spring session demanding the Liberals simply legislate the pay freeze, something the government insisted would not stand up in court if it doesn't first try negotiations.

The Liberals said the budget calls for balancing the books by taking reasonable actions to control spending, and warned demands by Hudak and the Tories to slash expenditures would result in dramatic upheaval across the province.

"Their plan has more holes than Swiss cheese," said Deputy Premier and Finance Minister Dwight Duncan.

"The Leader of the Opposition will close hospitals. He will close schools."

Only a few government bills were passed since the election, including anti-bullying legislation that requires schools to allow student clubs called gay-straight alliances, a move that triggered a fight between the Liberals and Catholic church leaders and educators.

The legislature also updated the Human Rights Code to make Ontario the first province to extend protections to transgendered people after years of work on the issue by New Democrat Cheri DiNovo.

It also passed one more private members' bill Thursday, jointly sponsored by the Tories and NDP, to set up a One Call system where people can get information before digging in the ground to avoid hitting gas, sewer or power lines.

"It was almost a do-nothing session, sadly," said Hudak.