The school walkout that erupted over nine days in late winter, when striking educators and support personnel flooded the Capitol and the Republican governor and Legislature capitulated, has scrambled assumptions about politics in West Virginia. A longtime state senator who had accused strikers of holding children “hostage” was defeated in a Republican primary in May by a rival who pulled in union donations.

Jane Baumgardner, a retiree in Huntington, said she was uncertain about either candidate in the Third District race until she remembered that her daughter, a school counselor, had told her she loved Mr. Ojeda. Ms. Baumgardner said she would vote for him as well.

Huntington, the state’s second-largest city, is Ms. Miller’s home. On a recent Friday, Marjorie and Clarence Bailey, both 73, were strolling in Ritter Park, an affluent neighborhood of the city. Both support Ms. Miller.

Ms. Bailey said she opposed the 5 percent pay raise the teachers won by striking. “I think they get enough time off as it is, and they shouldn’t complain if they get lower money,” she said.

Her husband, retired from a mine supply company, called an effort by Ms. Miller to make the Bible the state book “a tremendous thing.”

At Pullman Square, an upscale retail development on the Ohio River, Joe George, a financial adviser, said he was undecided.

“I like both of them,” he said. “One has a local flavor and is well established in the community. The other I also like, because of his frankness and his ability to communicate with the teachers.”

Mr. George is a Republican, but in his view, Mr. Ojeda has a good chance to win. “He took the fight to the legislators, and the teachers got a well-deserved raise,” he said. “He seems to be the champion of the people right now.”