A lack of historical perspective is another explanation. Portuguese living standards increased greatly in the 25 years after the democratic revolution of April 1974. In the 1990s labor productivity increased rapidly, private enterprises deepened capital investment with help from the government, and parties from both the center-right and center-left supported increases in social spending. By the century’s end the country had one of Europe’s lowest unemployment rates.

In fairness, the optimism of the 1990s gave rise to economic imbalances and excessive spending; skeptics of Portugal’s economic health point to its relative stagnation from 2000 to 2006. Even so, by the onset of the global financial crisis in 2007, the economy was again growing and joblessness was falling. The recession ended that recovery, but growth resumed in the second quarter of 2009, earlier than in other countries.

Domestic politics are not to blame. Prime Minister José Sócrates and the governing Socialists moved to cut the deficit while promoting competitiveness and maintaining social spending; the opposition insisted it could do better and forced out Mr. Sócrates this month, setting the stage for new elections in June. This is the stuff of normal politics, not a sign of disarray or incompetence as some critics of Portugal have portrayed it.

Could Europe have averted this bailout? The European Central Bank could have bought Portuguese bonds aggressively and headed off the latest panic. Regulation by the European Union and the United States of the process used by credit rating agencies to assess the creditworthiness of a country’s debt is also essential. By distorting market perceptions of Portugal’s stability, the rating agencies — whose role in fostering the subprime mortgage crisis in the United States has been amply documented — have undermined both its economic recovery and its political freedom.

In Portugal’s fate there lies a clear warning for other countries, the United States included. Portugal’s 1974 revolution inaugurated a wave of democratization that swept the globe. It is quite possible that 2011 will mark the start of a wave of encroachment on democracy by unregulated markets, with Spain, Italy or Belgium as the next potential victims.

Americans wouldn’t much like it if international institutions tried to tell New York City, or any other American municipality, to jettison rent-control laws. But that is precisely the sort of interference now befalling Portugal — just as it has Ireland and Greece, though they bore more responsibility for their fate.

Only elected governments and their leaders can ensure that this crisis does not end up undermining democratic processes. So far they seem to have left everything up to the vagaries of bond markets and rating agencies.