The government employment pinch especially hurts in small and rural counties, where President Trump and other Republicans are popular. These areas tend to lack the number and diversity of private employers found in larger cities, and are therefore more dependent on government jobs.

Oklahoma is one of several Republican-led states where persistent anti-tax sentiment and severe budget cuts have guided policymaking, particularly since 2010, when many candidates supported by Tea Party voters won local offices.

Then, the newly elected governor, Mary Fallin, led the charge to reduce the state’s top income-tax rate and shrink the tax on oil and gas production to 2 percent from 7 percent for new wells. But a sharp drop in oil and gas prices in 2014 delivered an unexpected wallop. Tax revenue evaporated, leaving huge budget shortfalls since then.

Justin Fortney, 41, was one of 200 employees laid off by the state health department this year. “It’s getting more difficult to be a public employee — whether that’s a teacher or public health officer — and see yourself as part of a thriving middle class,” he said.

Mr. Fortney, who lives with his wife and son in Guthrie, 30 miles north of the capital, was forced to start job hunting. “We always made it work,” said Mr. Fortney, who was employed by the state for 12 years and earned about $50,000 annually. “But if you’re going to choose to be a public servant, you have to have in mind that you will live in a small home and drive a sometimes unreliable vehicle.”

He said he worried that talented workers will opt for the private sector. Staffing shortages are common in states across the country.

In Houston, pinched by a property tax cap, the police chief has said his department is short 1,500 to 2,000 officers. In North Carolina, a federal report blamed a 25 percent job vacancy rate at a state prison in Elizabeth City for four deaths that occurred during a breakout attempt.