For his part, the governor chalked up the defeats to the same angry electorate that propelled Donald Trump to victory in the Republican presidential primaries. “Kansas is not immune from the wide-spread anti-incumbency sentiment we have seen across the nation this election season,” Brownback spokeswoman Eileen Hawley said.

Yet in spite of the Trump phenomenon, incumbent legislators have actually done quite well so far this year. Tea Party Representative Tim Huelskamp’s loss on Tuesday in Kansas’s 1st congressional district was just the second defeat for a sitting member of Congress who was not either under federal indictment or facing a fellow Republican congressman.

No, this Republican revolt was about Kansas, and a budget crisis that has spiraled out of control since Brownback and the state legislature slashed income taxes and exempted some 330,000 small business owners who file as individuals from paying state income taxes. The economic plan did not unleash the economic growth conservatives promised, and state budget revenues consistently fell short of projections.

Brownback won reelection in a tough race in 2014, but the fiscal situation only grew worse in his second term. Unwilling to either slow or reverse the income-tax cuts, the governor instead prodded the legislature to raise the state’s sales tax, cigarette tax, and other levies on consumption as a way to help close a $600 million deficit in 2015. Earlier this year, the governor was forced to withhold money for university and teach pensions and halt highway projects to address the persisting shortfall. Credit-rating agencies have downgraded Kansas state bonds three times in the last two years.

“I do think it was a longtime coming,” Burdett Loomis, a professor of political science at the University of Kansas, said of the voters’ rebuke of Brownback at the polls. There was, he said, a “general sense that the state has taken hits it didn’t have to take with all the Brownback policies.” Republican voters were saying: “Wait a minute, what are you doing to this state?” Loomis said. “A whole bunch of things were starting to fray at the edges.”

Kansans were particularly alarmed at the prospect of cutbacks to school spending and the deterioration of the highways—a lifeline for the large rural areas of the state. Moderate Republicans ran on a message of fiscal responsibility, protecting investments in education, and returning Kansas to the style of governing exemplified by former Senate Majority Leader Bob Dole, now a beloved elder statesman. “We were running to restore the fiscal viability of Kansas,” Ed Berger, a Republican who defeated the state senate majority leader, told me on Wednesday.

While the conservative Kansas Chamber of Commerce, the Club for Growth, and the Koch Industries-funded Americans for Prosperity state affiliate were strongly supporting incumbents aligned with Brownback, challengers won backing from the teachers unions, highway contractors, hospitals, and a broad center-right group known as the Save Kansas Coalition. As the primaries drew close, ideological labels were muddied: Republicans on either side tried to tie their opponents to President Obama and Hillary Clinton, and both Brownback allies and challengers described themselves as “conservatives.” “I think if you’re a conservative, you vote for a balanced budget. If you’re a conservative, you don’t borrow from our future,” Berger said. “I think that flies in the face of what was taking place with our government.”