CANCER is a personal tragedy. Even his bitterest foes should wish Venezuela's president, Hugo Chávez, a speedy recovery from the illness that has now sent him to doctors in Havana for the second time in six weeks. There is no way of knowing whether this is likely: Mr Chávez's government treats the details of his condition as a state secret, in the worst traditions of the Kremlin or North Korea (see article). But his supporters should be under no illusion: even before the man himself was struck down, chavismo was in terminal decline, outside Venezuela at least.

In his heyday five years ago, Mr Chávez projected his “Bolivarian revolution”, a gaseous concoction of authoritarian socialism and populism, as a continental force. With like-minded presidents from a handful of other Latin American and Caribbean countries, he forged an “anti-imperialist” (ie, anti-United States) block. Not only did Mr Chávez deploy the popular touch of a born communicator, but he was also armed with seemingly limitless oil money. Latin America's liberals quailed. Mr Chávez even goaded Brazil's Lula, a fellow-leftist but a democratic one, by egging on the nationalisation of Brazilian assets in Bolivia and Ecuador.

Today, the anti-emperor has almost no clothes. The rest of South America is enjoying strong economic growth, but Venezuela is only just emerging from two years of recession. Its economy is a victim of gross mismanagement. Oil output is falling and power cuts are endemic. Venezuelans face rampant inflation and shortages (cooking oil is the latest rarity). Caracas has become the continent's murder capital. When it comes to cutting poverty, other countries have overhauled Venezuela.

The most notable is Brazil. It is Lula's mix of economic stability, private investment and social programmes that is now the fashionable formula in the region. This shift in ideological hegemony is neatly captured in the political journey of Ollanta Humala, who takes office as Peru's president on July 28th. Five years ago, Mr Humala campaigned as an ally of Mr Chávez. In this year's election he declared himself a convert to the Brazilian way. In the interim, Peru became South America's fastest-growing economy by following free-market policies and courting foreign investment. Mr Humala's first moves suggest a welcome enthusiasm for economic stability (see article). With luck, he may also grasp another crucial element in Brazil's success: respect for contracts with private investors.

Triumph for the Brazilian model

This newspaper has long argued that chavismo is an atavistic blind alley for Latin America. By contrast, Brazil has sought to develop a modern Latin American social democracy that marries a globalised capitalist economy with vigorous government efforts to attack deep-rooted inequalities. But there are limits to this approach too. The scale and scope of government in Brazil continue to grow in ways that may not necessarily benefit the poor. Fiscal largesse in Lula's final years contributed to economic overheating. Mr Humala should note that Dilma Rousseff, Lula's pragmatic successor, now wants private investors to operate airports and ports, as well as roads.

In Venezuela, chavismo may live on, with or without its creator: a dozen years of spraying oil money in the general direction of poorer Venezuelans buys the abiding loyalty of some, even if it has all but destroyed the economy. But the tide of Latin American history has turned against Mr Chávez.