“It is, no question, a hard time for the state,” Gov. Matt Mead said in a telephone interview. “As difficult as it is now, I think it can get worse. If these people pack up and leave, the local restaurant won’t even get that occasional business. It’s heartbreaking to see.”

The layoffs have forced an economic reckoning in a state where oil, gas, coal and uranium provide 60 to 70 percent of revenue. Tourists and second-home buyers are still flocking to Jackson Hole, wind turbines are blooming along the plains and Microsoft is expanding a data center in Cheyenne. But those pale in comparison with the shadow that energy extraction — much of it on federal lands — casts across the economy.

“We’ve got to diversify the economy,” Mr. Mead said.

Falling tax revenue forced deep budget cuts this year and prompted lawmakers to draw $180 million from the state’s rainy-day fund. The budget crunch also intensified a debate within the Republican-dominated state government over whether to expand Medicaid under President Obama’s health care law.

Mr. Mead, a Republican, opposed the Affordable Care Act, but in 2014 started urging the Republican-controlled State Legislature to accept the Medicaid expansion, saying it would bring in about $268 million in federal dollars and cover about 20,000 low-income people. But the Legislature balked, saying it would force Wyoming to shoulder a huge government expansion with an unknown price tag down the line.

“We care about our people,” said Phil Nicholas, the State Senate president. “But we also believe you can create problems by creating straight-out entitlements without any obligation or effort to improve your situation.”

Democrats said the budget cuts and Medicaid rejection ended up heaping most of the pain on Wyoming’s poor. A literacy program that helped people earn high school equivalency degrees was eliminated, as were programs that provided dental care and property-tax rebates to low-income old people.