West Virginia Gov. Jim Justice announces Tuesday that a deal was reached to end a statewide teachers strike. (John Raby/Associated Press)

MARTINSBURG, W.Va. — Striking West Virginia teachers are expected to return to their classrooms this week after educators and the state’s governor reached a deal on a 5 percent raise.

Gov. Jim Justice (R) announced the end of the work stoppage Tuesday at the state Capitol in Charleston, saying educators will be back on the job Thursday, with Wednesday serving as a “cooling off day.” The announcement signaled an end to a strike that has had a sweeping effect in West Virginia, a state with more than 277,000 public school students.

“The long and the short of it is just this: We need our kids back in school. We need our teachers back in school,” Justice said. “They want to be back in school. Our service personnel wants to be back in school.”

The strike, sparked by concerns about pay and benefits, began last week. Schools had closed in all 55 counties, as educators and school employees headed for picket lines in their communities and gathered at the state capitol. West Virginia’s public school students started their week out of school again Monday, although a spokeswoman for the state’s Education Department had said some of those closures were because of flooding or previous schedule arrangements.

At Tuesday’s news conference, Justice announced an agreement on a 3 percent raise for all state employees, with an additional 2 percent increase for those who work in education. The proposed pay increase still has to pass West Virginia’s legislature.

“To be perfectly honest, in a lot of ways, I was looking at this maybe not correctly,” Justice said. “You know, I’ve said many, many, many times we ought to look at education as an economic driver. But maybe I was looking at it as what is the prudent thing to do and not necessarily looking at education as an investment.”

The salary for beginning teachers in West Virginia is $32,435 a year, and the average teacher salary is $44,701, according to the state teachers union. The state ranked 48th in average teacher salaries in 2016, according to data from the National Education Association. That data, which included 50 states and the District, showed that only South Dakota, Mississippi and Oklahoma ranked below West Virginia.

Teachers in the state had not only been concerned about benefits and salary, but also “attacks on their voice,” Christine Campbell, president of the American Federation of Teachers-West Virginia, a major union, had previously said.

“So our people are standing up, they’re energized, and they’re willing to do what they feel they have to do for our students and public education, to make it a priority,” she had said.

Teachers in West Virginia went on strike in 1990, a state Education Department spokeswoman has previously said, but participation in that stoppage varied county to county and was not statewide.