VANCOUVER -- A bitter battle between British Columbia teachers and the provincial government is headed for the Supreme Court of Canada after legal tussles and school strikes had both sides vying for public support.

The province's highest court ruled Thursday that the government did not violate teachers' charter rights to bargain class size and composition, reversing a lower-court decision in favour of the union.

The B.C. Teachers Federation said it will seek to appeal the latest decision in Canada's top court.

"All teachers are asking for are workable, teachable classrooms," said union president Jim Iker. "We're asking for the government to give us the resources that will help us do our work -- teaching our students."

"Our children deserve the best but they're not getting it from this government."

Iker vowed to seek appeal just moments after Premier Christy Clark hailed the court decision, saying it's a chance for both sides to put a 13-year dispute behind them and work together.

Four of the five judges said the findings of a lower court, which determined the province had failed to consult the union in good faith, were based on legal and factual errors.

A B.C. Supreme Court judge has twice ruled the government infringed on teachers' rights when it removed their ability to bargain class size and composition with separate legislation in 2002 and in 2012.

Judge Susan Griffin ruled last January that the 2012 legislation was unconstitutional. She also read hundreds of pages of confidential cabinet documents and concluded the government negotiated in bad faith and deliberately planned to provoke a strike.

The appeal court overturned that decision on Thursday.

"In our opinion, the legislation was constitutional," the judges said in written reasons.

"Between the consultations and the collective bargaining leading up to the legislation, teachers were afforded a meaningful process in which to advance their collective aspirations. Their freedom of association was respected."

Dissenting Judge Ian Donald wrote that the legislation did infringe the charter and agreed with the trial judge that the province had failed to consult the union in good faith.

Clark, who was education minister in 2002, said the government was very pleased with the court decision.

"Today, what we have is a unique opportunity," she said. "The question for all of us is what we will do with that unique opportunity. Let us take up that call and work together."

Education Minister Peter Fassbender said moving past the dispute will allow teachers and the government to move toward improving outcomes for B.C. students.

Both Clark and Fassbender made their comments before learning the BCTF would attempt to appeal the decision.

Iker said the union has been awarded about $2 million in previous court decisions, which he expects will have to be paid back to the government.

He shrugged off questions about how much various court actions have cost the teachers' union and said a Supreme Court of Canada appeal would be paid for with members' dues.

"We're absolutely committed to take this to a higher level. It's important for our students, it's important for our members, it's important for all working people across this province," he said.

The appeal court also released a separate, unanimous decision Thursday, ensuring that confidential cabinet documents that were revealed in the trial would be kept secret.

Griffin had ruled that the union could share with members its written submissions, which included quotes from private government documents, but the appeal court overturned that decision.

The court case emerged as one of the main sticking points last year when a teachers' strike closed schools earlier in June and delayed the start of classes in September until the union signed a six-year deal.

Rob Fleming, education critic for the Opposition New Democrats, said the premier's ongoing confrontational approach with teachers began in 2002 when she was education minister and ripped up their contracts.

"Parents and students have endured disruption and uncertainty in schools under Premier Christy Clark and the B.C. Liberals, and it's time for that to change."