Kansas state Reps. John Barker and Dan Hawkins, both Republicans, confer during a debate on tax issues in May in Topeka. Lawmakers struggled to agree on a plan to raise new revenue to close projected budget shortfalls. (John Hanna/AP)

It has become a summer ritual: State lawmakers, unable to agree, labor late into the evening to hash out a last-minute budget deal to ensure debts get paid, school buses show up, the elderly get their daily meals and parks stay open for tourists.

But the political theater — which just played out in dramatic fashion in Illinois and New Jersey — is a symptom of a worsening problem, state fiscal policy experts say. Years after the housing crisis undermined the U.S. economy, state budgets are still being battered, facing the strain of plummeting energy prices, generous tax cuts and a boom in online shopping that has depressed sales tax collections.

The particular factors are as diverse as the states. But one thing is clear: More states are facing financial trouble than at any time since the economy began to emerge from the Great Recession, according to experts who say the situation will grow more dire as the Trump administration and GOP leaders on Capitol Hill try to cut spending and rely on states to pick up a greater share of expensive services like education and health care.

“When you look at so many states already really not providing in the way that they need to in terms of investments that support our communities, and then you potentially have the rug pulled out from under them with federal cuts . . . that’s going to really magnify the crisis at the state level,” said Misha Werschkul, executive director of the left-leaning Washington State Budget and Policy Center.

On Thursday, lawmakers in Illinois — which is infamous for budget dysfunction — took the historic step of overriding the governor’s veto of the state’s first budget since 2015. Gov. Bruce Rauner (R) had objected to a tax increase included in the spending plan, but some Republicans joined with the legislature’s Democrats to support the measure in the face of $15 billion in unpaid bills and threats from credit-rating agencies that the state could be reduced to junk status.

State Rep. Steve Andersson (R), center, shakes hands with Illinois House Speaker Michael Madigan (D) after the state House voted to override Gov. Bruce Rauner's veto and pass a budget for the first time in two years. (Justin L. Fowler/AP)

In New Jersey, a clash between Democratic leaders in the state Assembly and Gov. Chris Christie (R) last week led to a government shutdown, including the closing of state beaches the weekend before the July 4 holiday. The dispute, which has since ended, grabbed headlines when Christie was spotted soaking in the sun with his family on one of the beaches ordered closed.

Other states are in similarly bad straits, though their situations haven’t gotten the same public attention. In some cases, states are facing a drop in revenue caused by lower-than-expected tax collections or other economic problems. In others, the issue is largely political as lawmakers clash along party lines about whether to tax more or spend less.

Thirty-three states faced revenue shortfalls in 2017, bringing in less money than they projected for public services, according to the National Association of State Budget Officers. That’s more than any year since 2010.

With just hours to go before the new fiscal year began July 1, 11 states still had no budget — an unusually high number, even considering the brinkmanship that routinely overtakes the state budget process. Even now, six states have yet to agree on a new spending plan.

(Patrick Martin/The Washington Post)

Alaska is facing a multibillion-dollar budget hole because of the steep decline in the price of oil, which accounts for 90 percent of the state’s revenue. Trading at more than $100 per barrel in July 2014, oil is now at less than $50 per barrel. The state, which lacks income and sales taxes, has tried to make up for that loss by drawing from a rainy-day fund and cutting services.

The savings are all but gone now, and Alaskans have a hard time envisioning further service cuts. Courts now close at noon on Fridays, thousands of low-income families no longer receive subsidized heat, and school districts have grown accustomed to the annual rite of doling out pink slips to teachers: Anchorage laid off 99 teachers this summer, while rural Lake and Peninsula District — home to 13 schools in an area the size of West Virginia — saved money by shrinking its academic year by 20 days.

Alaska Gov. Bill Walker (I) speaks to reporters last month in Juneau. Walker called a special session, limiting its agenda to the state operating budget. (Becky Bohrer/AP)

The pain is shared in its energy-dependent brethren such as Louisiana and Oklahoma. Lawmakers remain deeply divided about what to do, as raising taxes remains unappealing for many, even as others argue that states have no other choice.

“There are times when you’re in political office you have to do things that are politically unpopular,” said Alaska Gov. Bill Walker (I), who is pushing to tax Alaskans’ personal income for the first time in nearly four decades. “That’s what it’s going to take, to step up and say this is not about me and this is not about my political future. This is about fixing our state.”

Lawmakers in Washington state narrowly averted a government shutdown after coming to a last-minute agreement to raise property taxes, a move meant to help the state fulfill a court order to invest more in its public schools.

The tax will be capped after 2021, leading some lawmakers to fear that it will fail to keep up with escalating costs, turning the new budget into just another short-term Band-Aid. Speaking on the floor of the Senate, state Sen. Jamie Pedersen (D) called it “not sustainable” and a “ticking time bomb.”

Several Republican-led states approved a wave of tax cuts in recent years, expecting that they would kick-start economic growth. But some of those states have since seen their revenue stagnate, leaving yawning gaps in their budgets that have forced draconian cuts to social service programs and infrastructure.

Perhaps best known among these states is Kansas, which enacted deep tax cuts in 2012 and 2013. But the cuts did not yield the hoped-for windfall, and persistent budget shortfalls led officials to cut back on social safety net programs such as Medicaid and food stamps as well as spending on courts, roads and bridges. The reductions led to a voter backlash and an about-face by the legislature, which raised some taxes this year.

A growing number of states — including some led by Republican governors — have produced forecasts in recent weeks warning that the GOP health-care bill before the U.S. Senate would have damaging effects on their budgets and on low-income residents covered by Medicaid. The plan would phase out federal money that allowed 31 states to expand Medicaid under the Affordable Care Act and shift the program from an open-ended entitlement, most likely to one with per-person spending limits.

“It’s an unmitigated disaster,” Connecticut Gov. Dan Malloy, chairman of the Democratic Governors Association, said in an interview. “It is not too strong to say this will kill people. What Republicans are debating in backrooms is a plan the result of which will cause people to die.”

An analysis by Connecticut’s Office of Policy and Management estimates that, by 2026, the Senate bill would shift up to $2.9 billion in annual costs to the state, potentially forcing up to 230,000 people off its Medicaid rolls. Connecticut already is struggling; a week into the new fiscal year, its lawmakers have yet to agree on a budget to deal with a considerable revenue shortfall.

Arizona, California and Minnesota have issued similar analyses. Late last month, the National Association of Medicaid Directors issued a statement saying that the Medicaid changes contemplated by the Senate “would be a transfer of risk, responsibility, and cost to the states of historic proportions.”

Republican leaders in Washington argue that capping federal Medicaid payments would impose needed discipline on the program, forcing states and providers to become more efficient.

Many on the right also say that state-level tax cuts have been unfairly demonized.

Joel Griffith, director of the Center for State Fiscal Reform at the conservative American Legislative Exchange Council, or ALEC, said Kansas’s mistake wasn’t making steep cuts. Rather, he faulted state leaders for flinching in the face of criticism.

“Now is certainly not the time to be raising taxes,” Griffith said. “The focus should be on how do they continue the reforms that were started.”

Since 2011, 11 states have enacted large tax cuts meant to be phased in over a period of years, according to the Center on Budget and Policy Priorities.

Phasing in tax cuts aims to ease their impact. But critics say that states often fail to plan for the resultant decline in revenue and that lawmakers are shielded from accountability when the full consequences of their votes won’t be felt for years.

One of those states is Mississippi, which this year faced a shortfall of $170 million. It has led to steep reductions in state spending, from cuts to firefighter positions to shuttered health clinics. Now, the state is set to absorb a massive $415 million tax cut to be phased in over the next decade.

The elimination of 650 positions in mental health, announced in April, has sparked fear among advocates for people with disabilities.

Janie O’Keefe, executive director of Disability Connection, an advocacy nonprofit in southern Mississippi, said even something as innocuous-sounding as a reduction in fuel funding could harm disabled people, because gas money helps those who live in institutions get out into the world and interact with the broader population.

“I understand that our country needs to start cutting somewhere,” O’Keefe said. “But I think it’s very sad if they are looking at disabilities, people who are very sick, the elderly, veterans — supporting them is the very thing the country has to do.”