A teachers’ strike that ground public schools to a halt across West Virginia is set to end on Thursday, a week after it began, Gov. James C. Justice and teachers’ union representatives said Tuesday. They announced a deal that signaled a win for unions in a reddening state, even though some lawmakers and even the teachers themselves expressed doubts it would ultimately work.

Mr. Justice, a Republican, said that he had promised the state’s teachers and other school employees a 5 percent raise and that he would create a task force to address the problem of rising insurance costs for public employees, a key issue in the strike.

“We need our kids back in school, and we need our teachers back in school,” Mr. Justice said in a news conference announcing the deal. He added that he was “hopeful” that state lawmakers would go along with his proposals, which would also give all state employees a 3 percent raise. But some Republican lawmakers appeared deeply skeptical of his plan to find the money.

The strike left more than 250,000 children out of school in the state’s 55 counties. Teachers crying “We’ll get louder” and carrying signs with slogans like “WV teachers deserve better” flooded the State Capitol, their voices echoing through the halls. The teachers frequently cited data showing that they are among the lowest-paid public educators in the United States.