THE LAMPS are going out all over Latin America. Two decades ago, there seemed hope at last that Latin America would emerge from its long, sad history of economic and political oppression. From Argentina to Mexico, the dictators and oligarchs fell in the 1980s and early 1990s --and so did the tariff barriers. Latin America was rejoining the world, or so Western investors were promised by the salesmen who peddled Latin American bonds.

But hopes that this time, no fooling, Latin America would at last achieve stability and freedom have once again been falsified. Since the economic crisis of 1998, the old ways have reasserted themselves, first in Venezuela (where the voters elected the onetime would-be dictator Hugo Chavez as president in 1998), then in Argentina (which defaulted on its debts and devalued its currency earlier this year), and now--most spectacularly--in Brazil. Last month, Luis Inacio Lula da Silva, known universally as "Lula," won the presidency of Brazil on his fourth try, with a platform that blended promises of radical economic redistribution, anti-Americanism, militarism, and a return to the protectionist policies of Brazil's past. In Latin America, the giddy, hopeful 1990s are now truly over. On the horizon are devaluation, inflation, and civil turmoil.

Studying Latin American history is like watching a handsome, talented friend throw his life away to some self-destructive addiction. Again and again he promises to reform; again and again he succumbs to the old affliction. In the 1870s, the 1920s, and the 1950s, Latin America seemed on the verge of success--and each time it faltered and failed.

This time, though, the failure (if it indeed occurs) will have more than local significance. The United States is now engaged in a world war against terrorism and Islamic extremism. In this war, America's ideals of democracy and freedom are powerful weapons. It won't help if America's nearest neighbors are rejecting those ideals at exactly the same time that the United States is attempting to propagate them in the Middle East.

For that reason, it is vitally important to understand what went wrong for many emerging markets in the 1990s. The critics and opponents of open markets have of course a ready answer: Globalization failed. Open trade, deregulation, and privatization, they say, further impoverished the already poor, who are now rising up against them in justified wrath. The former chief economist of the World Bank, Joseph Stiglitz, of all unlikely people, has become the leading exponent of this view. In a speech this summer, Stiglitz concluded that ''a reform strategy that promised to bring unprecedented prosperity has failed, in an almost unprecedented way."

But did the reforms of the 1990s fail? Is globalization finished? Is Lula the future? The best answers to all of these questions are found in two extraordinary books published this year: "Against the Dead Hand," by Brink Lindsey of the Cato Institute, and "Fighting for Freedom," the third volume of Robert Skidelsky's great biography of John Maynard Keynes.

"Against the Dead Hand" is the most important book yet published on the whole subject of globalization--brilliantly original, superbly well informed, and most important, unflinchingly honest. Honesty is a surprisingly rare virtue in writing about globalization. An unpleasant odor of hucksterism and salesmanship lingers upon too many of the words published in the 1990s about emerging markets and the global economy. Remember those television commercials showing little Paulita in Montevideo e-mailing chess problems to little Ming in Shanghai? The hucksters wanted to convince American investors that it was technology that was changing the world--and that there was still time to get in on the ground floor.

Brink Lindsey urges us to understand globalization in a radically new way: politically, not technologically. That understanding illuminates with clearer light the progress we have made toward a more open world--and the reaction against that progress in both rich and poor nations.

As Lindsey tells it, the great intellectual event of the first half of the twentieth century was something he calls the "industrial counter-revolution." This counter-revolution attempted to use the state to corral and control the industrial revolution of the nineteenth century. This counter-revolution took extremely different forms from place to place, some of them politically benign (such as American Progressivism), some horrific (fascism and communism), but all of them concerned to insulate society against the unpredictable shocks and jolts of entrepreneurial capitalism, and all of them ultimately unsuccessful.

What we call "globalization" is the global response to that unsuccess. It wasn't the Internet that convinced poor countries from Argentina to Singapore that exporting was the route to prosperity--and that barriers to imports made exporting impossible. Nor was it jet planes that forced Mexico, Hungary, and South Korea to acknowledge that they needed foreign investment. It was the failure of state control.

But while this failure discredited the industrial counter-revolution, it did not assuage the grievances and resentments that inspired the industrial counter-revolution in the first place. The story of the 1990s, then, is not the story of exciting new technologies smashing dreary old hierarchies. It is a story of societies and governments grudgingly adjusting to realities they would have preferred to avoid.

In careful studies of countries from Argentina to Thailand, Lindsey shows the tight grip of the dead hand of the past: countries that opened their markets to imports of goods, while trying to keep tight state control over their financial sector; countries that linked their currency to the dollar, while pursuing policies that made the link unsustainable; countries that sought foreign investment, while refusing to protect foreigners' lives and property.

"Against the Dead Hand" is a devastating critique of the 1990s fantasy that global economic reform was an unstoppable force, over which humans could exercise no control. (A popular joke in Central Europe in the early 1990s asked how many Poles or Czechs or Hungarians it would now take to change a light bulb. Answer: none. The market would do it.) Progress is never more than an option, and can always be thwarted by human folly, enviousness, or indifference. The Brazilians may be about to discover that lesson the hard way--again.

Very soon, it may be the United States that takes up the struggle against the dead hand, this time in the Islamic world, as an agent of reconstruction and redevelopment in Iraq and perhaps other countries as well. There is no shortage of experts eager to itemize all the difficulties that the United States and its allies will encounter. It's a pleasure then to plunge into the third volume of Robert Skidelsky's biography and spend some time (make that lots of time; the book is long) in the company of John Maynard Keynes, a man who saw difficulties as challenges to surmount, not excuses for passivity.

Over the more than twenty years Robert Skidelsky took to complete his monumental work, he grew much more politically conservative, and so, maybe not coincidentally, does his depiction of Keynes. This third volume was originally subtitled "Fighting for Britain," and while the book has been renamed for the American market, the original subtitle was more apt.

By the time this volume opens, Keynes, the onetime iconoclast, had matured into a stalwart of Cambridge University, Eton College, the House of Lords, and even the very Treasury Department he had once despised as the stronghold of blinkered orthodoxy; the onetime Bloomsbury scoffer (he wrote in 1917 that he worked for "a government I despise, for ends I think criminal") metamorphosed into a robust British patriot, determined not only to defeat Nazi Germany but to defend Britain's independent imperial strength against the encroachments of the United States. His battlefield was the complex negotiation that created the International Monetary Fund and the World Bank at Bretton Woods in 1944.

There Keynes and his American counterparts battled over the leeway that would be extended to countries (like Britain) expected to run trade deficits after the war by those (like the United States) expected to run trade surpluses. It is hard to read these discussions now without some sense of shame for the ungenerosity of the American negotiators who insisted that Britain entirely exhaust its own resources as a condition for help from the United States, and the story is not made prettier by Skidelsky's conclusive case that the lead negotiator, Harry Dexter White, was at a minimum a Soviet sympathizer and very probably a Soviet spy.

Keynes died in 1946. He was only sixty-three. It is strange to look at photographs of this man in clothes that look almost contemporary standing in front of hotels that one could stay in today--Keynes especially liked the Mayflower in Washington--and realize that when his heart began to fail, the only remedy his doctors could offer for his pain was for him to pile bags of ice upon his chest.

Keynes did not live to see the American policy reversal of 1947-1949 that brought American money and American troops to rescue Europe for the third and final time in the century. I think that reversal would have surprised him. He did not have a very high opinion of the American people or their government. Oddly enough, this hero of the left seemed most irked by America's offensive informality and egalitarianism. In 1925, he had converted much of the wealth he had made in his bond-market speculations into a 600-acre country estate in Sussex, which he worked with a disdain for business rationality and an enthusiasm for traditional social distinctions that would have impressed Evelyn Waugh.

He could never accustom himself to the chaotic bureaucracy of Washington, with its endlessly ringing telephones and final subservience to the whims of whichever former insurance salesman or realtor it pleased the people of Missouri or Ohio to send to the Senate. On his way home from his last visit to the United States, Keynes stopped briefly in Ottawa. He loved Canada: not only its magnificent scenery, but also its vestigial British deference. If he ever had to leave England, he wrote to a friend at home, Canada was the country in which he would most like to live.

Whatever reservations one may have about Keynes the man and the international financial system of which he was the single most important designer--and there are plenty to choose from--it's hard not to be dazzled by the pulsing confidence of his mind. At the final dinner of the Bretton Woods Conference, Keynes delivered his brilliant toast: "To the economists--who are the trustees, not of civilization, but of the possibility of civilization."

For a brief moment in the 1990s, it appeared that we were on the verge of a regime of global liberty that would at last overcome global poverty. Now, from Bali to Buenos Aires, we seem once again to be heading backwards.

Of course, that is not how things are conventionally described. Britain's Guardian newspaper has hailed the election of Lula as "an inspirational triumph. . . . Neighbors such as Argentina and Uruguay may now believe that they, too, will find a middle way out of 'subservience' [to the United States]. . . . For the whole [American] backyard, it was a victory for self-respect." We shall see how much self-respect Brazilians feel when their government tries to escape its $260 billion foreign debt by inflating their savings out of existence.

In the meantime, Brink Lindsey has given us our best diagnosis of what went wrong in the 1990s--and Robert Skidelsky an inspiring reminder of our duty to try to set things right.