The deal is intended to end a teachers' strike that has canceled nine consecutive school days across the state. Teachers' union representative Christine Campbell told CNN she anticipates school will be back in session Wednesday.

Both the House of Delegates and Senate unanimously approved the bill and Justice signed it into law. As part of the negotiations, legislators also agreed to give all state employees a 5% raise during upcoming budget negotiations.

"It took a lot of pulling for everyone to get there," Justice told crowds of cheering educators at the state Capitol in Charleston. "But we're there."

I'm an educator, I believe in your purpose, I believe in you, and I love our kids. pic.twitter.com/vcjy6z0Jgt

Randi Weingarten, president of American Federation of Teachers, said the deal was a "huge breakthrough" for school employees and for doing what's right.

"You have a story here, a modern-day story, of labor solidarity on an issue that is irrefutable," she said. "That for teachers to stay in our profession, for bus drivers and support staff to stay and do this work, we need a livable wage, and we need the conditions in schools that we can help kids thrive."

Deafening cheers outside as senators exit the chamber pic.twitter.com/WbyQFkUead — Sarah L. Jorgensen (@SarahLJorgensen) March 6, 2018

The strike began February 22 when about 20,000 teachers walked out of schools in what has been a show of the strength of organized labor.

Public schools in 55 counties across the Mountain State were closed again Tuesday as teachers and educators demanded higher wages and better benefits, particularly for the embattled state employee health insurance program known as the Public Employee Insurance Agency, or PEIA.

West Virginia ranks 48th in the nation in terms of how much it pays its teachers, according to the National Education Association , and educators say that low pay pushes qualified teachers to leave the state.

Separately, the governor agreed to set up a task force to address the state health insurance program on March 13.

Teachers hold a rally Monday outside Senate chambers in the West Virginia state Capitol.

Though currently limited to West Virginia, the strike has had repercussions outside the state as teachers in Oklahoma say they, too, have reached their breaking point and are considering walking off the job next month.

Yet the focus in West Virginia has remained on the teachers in the trenches, even for students who have been out of class for days.

"I wish it wouldn't have come to this and that I was still in school, but I want the teachers to get the wages that they deserve, so I'm all right with it," Victoria Blickenstaff, a sophomore at Fairmont Senior High School in Fairmont, said before the announcement of the deal.

A legislative standoff

The West Virginia Legislature faced a standoff over how much of a pay raise to offer striking teachers and educators. A legislative conference committee was appointed to resolve differences between bills in the House and Senate.

Last week, the governor and union leaders agreed that teachers and service personnel would receive a 5% pay raise, and the House approved the proposal. However, Republicans in the Senate passed a bill Saturday night with a 4% raise.

Union leaders said teachers wouldn't return to work until they got a 5% raise.

At a legislative conference committee meeting Tuesday to resolve the issue, Republican state Sen. Craig Blair said the new deal represents the largest pay raise in state history.

There will be no tax increase to offset the raise, and Blair said the government will see a $20 million reduction in spending out of cuts to general services and Medicaid.

"With this agreement today to reduce spending in state government, in order to give every single dollar available to our public employees, we've achieved the goal of being fiscally responsible while also getting a pay raise that will help our teachers get back in the classroom and our students back to school," said Senate Majority leader Ryan Ferns, a Republican.

Justice told CNN that the funding would not come out of Medicaid or Medicare; the subject will come up in budget negotiations.

The governor said that the bill was a win not for any particular group -- but for what's right.

"At the end of the day, I think right won out," Justice said. "Not that the unions won or the Legislature won or I won. It's the idea and the premise that we ought to invest in education and let education be an economic driver for us."

This story has been updated to clarify who gets the 5% raise in the bill signed by Gov. Jim Justice on Tuesday