HALIFAX -- With shouts of "Shame" cascading from the public gallery, Nova Scotia's Liberal government passed a contentious bill Tuesday ending a 16-month contract dispute with the province's 9,300 public school teachers.

The Liberals used their majority to ram through Bill 75, which also ended a work-to-rule job action that began Dec. 5.

The vote was 33 to 17.

"Teaching is not easy," Education Minister Karen Casey told the house as she moved passage of the final reading of the legislation late Tuesday afternoon following a lengthy session that began at 12:01 a.m.

"Challenges in the classroom are very real," said Casey. "It is our responsibility as government to work with our teachers to ensure that our students remain a priority for both."

Introduced last Tuesday, Bill 75 became law after a series of around-the-clock sittings, usually accompanied by the sounds of teachers and their supporters banging drums, blowing whistles and chanting outside Province House.

Speaking with reporters Tuesday, Premier Stephen McNeil said the law was needed to return classrooms to normal by ending the teachers' work-to-rule job action.

"We were hoping to get an agreement at the bargaining table, as I've said so many times," said McNeil. "There is no question it (work-to-rule) has had an impact on students ... we had to move so this contract would be in place and work-to-rule would end."

Teachers held a one-day strike Friday in protest of legislation they say doesn't provide the help they need in the classroom. It was the first time in the union's 122-year history that members had walked off the job.

The new law imposes a four-year contract that contains a three per cent salary increase and incorporates many elements included in the first two tentative agreements rejected by union members. A third tentative agreement was also rejected earlier this month.

Nova Scotia Teachers' Union president Liette Doucet said she was proud of how her membership had stood up for its rights and advocated for better classrooms.

"They believe through this action that they have had their voices heard and their voices have been heard right across the province," Doucet said. "They hope that the citizens of this province realize that we have a broken system and that something needs to be done and pressure needs to remain on the government to make those changes."

McNeil said after the vote that the government will now focus on a promised committee for classroom improvement, which will get $20 million over two years and make recommendations to improve working conditions.

The bill was passed with a minor amendment that will bring in an arbitrator to settle disputes between members of the committee, comprised of four government representatives, one union co-chair and nine classroom teachers selected by school board superintendents.

Under the last deal rejected by union members, the provision would have allowed the arbitrator to rule on issues worth up to $250,000 a year. Liberal house leader Michel Samson said the government was doubling the amount to $500,000, and that any member of the 14-member council would now be allowed to trigger the arbitration process.

The NSTU has said the council's composition doesn't give it enough say, and Doucet said the union would look at appointing members to the committee.

She also said teachers would not be forced by the union to do extra activities like coaching outside school hours that aren't covered by the contract.

"Those are the things that teachers actually love doing with their students," Doucet said. "If teachers make decisions not to do those things -- those will be very hard decisions for our teachers."

Under questioning in the legislature, McNeil revealed the government saved about $3.4 million in the one-day strike. He said the money would be used for student grants across the province.

Opposition Progressive Conservative Leader Jamie Baillie asked McNeil whether the province was setting aside funds for a court challenge the union has vowed to launch.

"By his reckless actions, the premier has committed the taxpayers of Nova Scotia to years of legal challenges and millions of dollars in legal costs," Baillie said.

He pointed out that prior challenges in British Columbia and Ontario had resulted in successful lawsuits.

However, McNeil expressed confidence the bill would withstand a legal challenge by the union.

"We had three different agreements with two different executives of the teachers' union," he said. "Each and every time we went to the table ... we changed the agreement providing more support.

"I think even the lawyer representing the teachers' union said this piece of legislation will stand the test."

NDP Leader Gary Burrill said the only thing that can end the mistrust between the sides is "with the new broom that we'll have in an election."

As he left the legislature Tuesday, McNeil's vehicle was held up by protesting teachers carrying placards for about four minutes before it could squeeze through the gates and onto a downtown Halifax street.