RICHMOND, B.C. -- A marathon bargaining session with the help of a master mediator has resulted in a tentative contract that could end British Columbia's bitter teachers' strike and allow half a million students to start their school year.

The breakthrough in negotiations came in the early morning hours of the sixth day of talks at a Richmond, B.C., hotel between the union and the employers' association with the help of mediator Vince Ready.

Ready -- known for his ability to solve even the toughest labour disputes -- said both sides worked hard to reach the tentative contract.

"After all these hours, I am very pleased to announce that the parties have reached a tentative agreement," he told reporters outside the hotel.

"I'm not at liberty to release any of the details, nor are the parties. The parties are going to meet later this morning and finalize a few of the outstanding details, but generally speaking, there has been a tentative agreement initialized by the parties and that's really all I got to say at this point."

The B.C. Teachers' Federation thanked its more than 40,000 members through social media for their "commitment, courage and strength" during their months-long strike.

The union's Nancy Knickerbocker said on Twitter that teachers will read over details and vote on the agreement Thursday. She said workers will also need to clean and prep schools that have been closed since mid-June.

Administrators are anticipating the earliest most schools could open is Monday.

Patti Bacchus, chair of the Vancouver School Board, said if the contract is ratified the board will attempt to steam roll into the school year as quickly as possible. Principals have already been preparing behind the scenes, she said.

"We're fairly well prepared, but I know teachers have let me know that they haven't been able to do things in their classrooms to prepare and really left things where they dropped them in June," she said in an interview. "It's going to be bumpy for sure and people are going to have to be a little bit patient, but I know there's a great desire to get back as soon as we possibly can."

Bacchus said she's thrilled the deal was reached at the bargaining table, noting the board was starting to get pessimistic that could ever happen.

"I hope this will help deal with some of the damaged morale as we go forward. Given that it is a negotiated deal, that's really the best way if it can happen."

Vernon Supt. Joe Rogers said he expects schools to open next week, adding the resumption of classes may be dictated by terms of the deal.

Teacher Ig Cheung said he's feeling a sense of relief, but still intends to read the details of the agreement closely before deciding how to vote.

"I'm just hoping we haven't given up too much," said Cheung, who's been teaching nearly two decades in Surrey, B.C.

He said with morale waning on the picket lines, there is more uncertainty even when school starts because not all his colleagues will immediately put their whole hearts back into it.

"This is going to be a very different year," he said. "Some teachers, after all this, may just go and teach. They (will) forego extracurriculars like running clubs, coaching teams."

Talks resumed last week under increasing pressure from the public and suggestions by the government that legislating an end to the dispute was an option.

Last Wednesday, the B.C. Teachers' Federation voted overwhelmingly to end their dispute if the government agreed to binding arbitration -- something the government firmly rejected.

Teachers launched full-scale job action two weeks before the summer break and students have missed more than two weeks of their new school year.

The union and B.C. governments -- no matter what political affiliation -- have a decades-long history of animosity and difficult labour disputes.

Teachers in the province have been without a contract since June 2013 and class size and composition have been major stumbling blocks in the dispute.

Last January, a B.C. Supreme Court judge ruled the provincial government violated teachers' rights in 2002 when it declared they could no longer negotiate the size of classes or the number of support staff in classrooms. The province is appealing that decision.

But in an attempt to get movement at the bargaining table, the union began escalating stages of labour action in April, moving to a full strike in the last weeks of the school year.

About two weeks before the end of the last school year, teachers launched a full-scale walkout.

In July, Finance Minister Mike de Jong announced the B.C. government would pay parents $40 a day for every child 12 and under if the teachers' strike continued into the start of the school year.

Ready agreed to make himself available in mid-August, but he walked away from the bargaining table Aug. 30, saying the two sides were just too far apart and schools remained closed after Labour Day.