RANSON, W.Va. — West Virginia Gov. Jim Justice sat before a crowd Tuesday and proclaimed a new day for education in his state.

“We will move forward,” the Republican said at a news conference in Charleston, the state capital. “No more looking back. West Virginia renews its investment in education and our precious children today.”

On this day, Justice and the state’s teachers had a deal to end a nine-day strike by educators that swept across all of West Virginia’s 55 counties and left more than 277,000 public-school students out of school. Teachers — and all state workers — would get a 5 percent raise.

West Virginia’s House of Delegates and Senate approved the pay raise, and Justice later signed it. Even as the announcement was still young, counties in the state Tuesday began to spread the word that their doors would open again.

Randi Weingarten, president of the American Federation of Teachers, an educators union, was in the state Tuesday and described a sense of relief and joy.

“You’re seeing it, frankly, on legislators’ faces, on the governor’s face, on members here, on parents,” Weingarten said. “It is a sense of joy here, that West Virginia figured out a way to help its public schools, to help its public-school educators, to help its public-school employees, and it did it together.”

As the work stoppage stretched, educators shared stories of scraping by in this state, where average teacher salaries ranked 48th in 2016, according to National Education Association data. Some have faced tough financial decisions or worked side jobs to make ends meet. Some have found themselves mired in complex health-care issues. And some are left asking: Who will teach the children in this state, if not us?

“We’re going to lose more teachers,” Keri Mahoney, assistant principal at South Jefferson Elementary School in Charles Town, said earlier this week, before the announcement. “We already have teachers in our building saying to us, during this crisis, ‘I’m not going to lie to you; I have to apply to other places if this doesn’t get worked out.’ ”

Brian Collins, a fifth-grade teacher at South Jefferson Elementary, has worked as a baseball umpire and an after-school math tutor to make ends meet. His wife is a teacher who works out of state, he said, pulling in more money. Even with that, he said, the couple feel as though they live paycheck to paycheck. Collins worries about keeping good teachers in the state and enticing new ones.

“I have two young girls; I want them to go through the school system having quality teachers all the way through,” Collins said. “Without proper pay and benefits, you’re not going to attract and keep and retain teachers that are highly qualified.”

West Virginia teachers walked out of their classrooms on Feb. 22 in protest of pay and rising health insurance costs for state workers. (Claritza Jimenez/The Washington Post)

Mahaley Beaty is a 24-year-old teacher in West Virginia. She woke up one morning to discover her cat, Toby, on the floor, having seizures. She rushed him to a veterinarian, leaving with a hefty bill. Beaty put it on her credit card, she said, but that meant she had to stop paying her student loans.

“You just end up making these choices,” Beaty said. “And I never feel caught up.”

Chris Atkins, a physical-education teacher at South Jefferson Elementary, had been standing on picket lines since the strike began, even on Friday, when howling winds crumpled his sign. Atkins, 39, was diagnosed with multiple sclerosis in 2008. On Monday, he was out again, explaining the health-care issues that teachers face and how limited benefits have affected his life.

Atkins said he has struggled to see doctors out of state because of insurance coverage issues. He has been denied medications. Every year he has to get an MRI, he said, but one year he was supposed to get two. That was another fight. And then there are the deductibles.

“At this point, all I want to deal with is the disease,” he said. “I don’t want to have to deal with that insurance. But the battle of having to deal with the insurance kind of took over more than actually having the disease itself.”

The governor had already promised to create a task force to address concerns about health care — a major concern during the strike. That task force would include educators, Justice said in a letter to state employees last week. At Tuesday’s news conference, Justice said appointments were expected to be in place later in the week.

“It is important that everyone understand that identifying all of the issues in our health-care program and finding a solution takes time,” Justice said in the letter. “A cure won’t come in 30 minutes, but I can promise you this task force will begin its work immediately.”

Atkins, a father of two young boys, was named teacher of the year in his county a few years ago, said his wife, Rachel Atkins. Recently, Atkins wrote to a member of the West Virginia House of Delegates about the need for a pay raise — something he’d never done before. In that email, Atkins reminded the delegate that he had taught the man’s child.

“Teachers want to go back to work,” Rachel Atkins said. “But they also want to be heard. Because we have families, too. Teachers have kids. They have to fight for what they believe in, because they have to be able to afford to live, and in our case, afford to get good medical care. The reality is, if that can’t happen, we’re going to lose, we’re going to lose good educators.”

Collins, the fifth-grade teacher, and Atkins were back on the picket line Tuesday morning, demonstrating in the cold as state lawmakers in Charleston reached the deal that would end the stoppage. As a line of educators stood bundled up, holding signs for passing cars, Collins and Atkins stood together, heads down. They listened to a live stream from the Capitol, playing on a cellphone held up close to their faces.

“I really hope that it’s finished today,” Collins said Tuesday morning. “So we can get back to class tomorrow.”

An announcement posted online Tuesday said that with ” joyous spirit,” the county welcomed its students and staff back to class Wednesday.

“You were deeply missed!” read the announcement, with that part of the message written in capital letters and bold type.