Updated

All public schools in West Virginia were shuttered Thursday as teachers geared up to strike for better wages and health insurance options -- even as Gov. Jim Justice signed a bill to raise teacher pay.

Still, dozens of teachers were gathering outside schools Thursday, ready to travel to Charleston, WV, to attend a rally outside of the capitol building, WSAZ reported.

On the eve of the impending strike, Justice, a Republican, signed a bill into law that would raise pay for teachers and state employees. The employees will receive a two percent raise in the 2018-2019 year and a one percent raise in each of the next two years, according to the Charleston Gazette-Mail.

WEST VIRGINIA WOMAN DRAGGED OUT OF CAPITOL FOR READING LIST OF CORPORATE DONORS

Justice said it's important to keep both teachers and kids in the classroom.

“We certainly recognize our teachers are underpaid and this is a step in the right direction to addressing their pay issue. The PEIA [finance] board has also voted to approve changes I recommended," Justice said in a statement. "I’ve asked and the PEIA board has voted to eliminate the mandated participation in the Go365 program, the use of combined household income to determine rates, and to freeze the plan for 16 months while we examine it and enact a long-term solution to the PEIA problems."

The state’s attorney general, Patrick Morrisey, wrote in a statement the “impending work stoppage is unlawful.”

“State law and court rulings give specific parties avenues to remedy such illegal conduct, including the option to seek an injunction to end an unlawful strike,” Morrisey said. “This illegal work stoppage affects hundreds of thousands of students and families across our state. Our office is prepared to support any relevant state agency or board with legal remedies they may choose to pursue to uphold the law. We also stand ready to assist and support any county board of education or county superintendent as they enforce the law."

According to the National Education Association, West Virginia teachers earn an average salary of $45,622, which ranks 48th among the states. The national average is $58,353.

Editor's note: An earlier version of this story incorrectly stated the timing of the raise increases.

The Associated Press contributed to this report.