Teachers unions are threatening to withdraw extracurricular activities for students after the Ontario government imposed a new contract that freezes teachers' wages for two years and bans them from walking off the job.

Bill 115, known as the Putting Students First Act, passed third and final reading in the provincial legislature on Tuesday, with 82 MPPs voting in favour of it and 15 MPPs voting against it.

Labour leaders shouted "shame, shame, shame" from the visitors' gallery following the vote.

Story continues below advertisement

"We are doing what we need to do, and we are putting the needs of students first," Premier Dalton McGuinty said earlier in Question Period.

Teachers unions are urging their members to protest the legislation by withdrawing their support for extra-curricular activities. Sam Hammond, president of the Elementary Teachers' Federation of Ontario, called the move an initial step in an "escalating" protest strategy.

The union is also introducing "McGuinty Mondays" - days on which teachers will be urged not to participate in any school-based meetings.

"It is not business as usual," Mr. Hammond told reporters on the front lawn of Queen's Park. "We are absolutely ashamed of what happened today."

Mr. Hammond said he is not setting a time limit on the protest. High school teachers will be asked to stop extracurricular activities for one day, said Ken Coran, president of the Ontario Secondary School Teachers' Federation.

The controversial legislation caps several weeks of tensions between the governing Liberals and public sector labour leaders. Mr. McGuinty escalated his battle with teachers last month by announcing that he would introduce legislation to freeze their wages for two years, cut sick days and ban them from going on strike.

Labour leaders have expressed outrage for the government's "blatant legislative interference" and "disrespect" for public sector workers' collective bargaining rights. They played a major role in helping the New Democrats win a by-election last week in the Southern Ontario riding of Kitchener-Waterloo by persuading teachers to defect from the Liberals.

Story continues below advertisement

The 15 MPPs who voted against the legislation were all part of the NDP caucus. NDP Leader Andrea Horwath warned that labour leaders will likely succeed in challenging the legislation all the way to the Supreme Court of Canada. As a result, she said, taxpayers could end up on the hook for not just back wages for teachers but also the government's costs associated with defending the legislation.

"I think it's reckless. I think it's fiscally irresponsible and I know for sure that it was a cynical move that the people are not going to buy," Ms. Horwath told reporters. "At the end of the day, it's a crapshoot at the best."

The legislation easily passed with the help of the Progressive Conservatives. Tory Leader Tim Hudak reiterated his call for an across-the-board wage freeze for all public sector workers in Ontario.

"We've got to stop digging," he told reporters. "Otherwise, we will never get out of this hole."

The government put teachers on notice last March that it wanted them to accept a two-year salary freeze and no movement up the pay grid to help eliminate the province's $14.8-billion deficit.

In exchange, the government pledged to preserve full-day kindergarten and protect gains made in previous bargaining rounds, including smaller elementary class sizes and more preparation time for teachers.

Story continues below advertisement

Catholic and francophone school boards were the only groups that voluntarily accepted the government's terms.

Fred Hahn, Ontario president of the Canadian Union of Public Employees, accused the government of "picking" on school teachers, custodians, librarians and secretaries when it should be imposing higher taxes on the corporate sector.

"Why don't they stand up to the bankers on Bay Street and get them to pay their fair share in taxes," he told reporters.