Good countries can sometimes go bad. Donald Trump’s supporters implicitly make this argument when they proclaim, “Make America Great Again.” And so do those who loathe Trump and see in him a dangerous populist response to the anger of frustrated middle-class voters.

The rise of Trump, love him or hate him, conveys an inescapable message: The United States’ political institutions are in decay, and voters are angry at a government that they perceive (correctly) to be broken. The danger is that Trump’s responses would probably make the underlying governance problems worse — and increase polarization and dysfunction even more.

The evidence of “Trump rage” has been clear in nearly every primary and poll this year. Ron Fournier of the Atlantic summed up the basic message when he quoted a voter in Flint, Mich., about the catastrophic failure of that city’s water system: “What matters to me as an American, what should matter to all Americans, is that we learn from this: How do we change the way government works? How do we fix these systems?”

Here’s the puzzle: A country that is angry at “government” or “Washington” will have difficulty fixing problems that result from the breakdown of public services caused by underfunding, incompetence and the predominance of private “special” interests over the public interest. What’s needed isn’t less government, but better government — which costs money and requires good leadership.

America’s political dysfunction is the subject of an important book called “Political Order and Political Decay,” published in 2014 by Francis Fukuyama, a Stanford University social theorist. Fukuyama became famous for asserting the triumph of liberal social order in his 1989 post-Cold War essay, “The End of History?” He has been trying ever since to sort out why that forecast proved so premature.

Fukuyama notes long-ago examples of thriving systems that grew rigid and failed to adapt to change, from the Han Dynasty in China to the Mamluks in Egypt to the Old Regime in France. He warns: “Modern liberal democracies are no less subject to political decay than other types of regimes.” Theorists imagine that democracies are self-correcting, but that doesn’t happen if voters “are poorly organized, or they fail to understand their own interests correctly.”

Decay happens when agencies that are supposed to serve the public are captured by elites, or overmanaged by elected officials, or buffeted by what Robert Kagan calls “adversarial legalism.” Basically, Fukuyama makes an argument for competent, uncorrupted bureaucrats — “public servants,” as they were once known. His model of an agency shattered by conflicting political mandates and poor management is the U.S. Forest Service, which went from a “gold standard” mission of managing forest resources to a secondary (and misconceived) goal of preventing forest fires.

“It would be one thing if the U.S. Forest Service were an isolated case of political decay,” Fukuyama writes. Unfortunately, “the overall quality of the American government has been deteriorating steadily for more than a generation.”

The deep anti-government hostility of the modern Republican Party is part of the problem. Tax cuts have starved many government agencies of money and good people. Fukuyama notes that Medicare and Medicaid, which account for 22 percent of the federal budget, are managed by 0.2 percent of federal workers. As the federal workforce has dwindled, the number of contractors has exploded. Taxpayers suspect that it’s a con, and they’re right.

Congress meddles with the federal agencies rather than passing legislation to solve problems. Fukuyama notes that the Pentagon is mandated to send Congress nearly 500 reports a year. “The United States is trapped in a bad equilibrium,” Fukuyama writes. “Congress mandates complex rules that reduce the government’s autonomy and make decisions slow and expensive. The government then doesn’t perform well, which confirms people’s original distrust.”

An angry public watches as the rich get richer, the middle class stagnates and government does nothing. Middle-class prosperity and self-confidence have been the foundation of U.S. democracy. Yet the Pew Research Center estimates that the share of household income going to middle-class families fell from 62 percent in 1970 to 43 percent in 2014, while the share for upper-income families rose from 29 percent to 49 percent.

Trump gives an angry America someone to blame: Muslims, Mexicans, government bureaucrats, free-trade negotiators, politicians, journalists. But he doesn’t begin to address the real problem of how to fix the United States’ political decay.

“No one living in an established liberal democracy should . . . be complacent about the inevitability of its survival,” warns Fukuyama. Or as Benjamin Franklin put it in 1787: “A republic, if you can keep it.”

Read more from David Ignatius’s archive, follow him on Twitter or subscribe to his updates on Facebook.