HAVING felt adrift ever since Venezuela's Hugo Chávez fell ill last year, Latin America's populists suddenly have a new champion. Cristina Fernández, Argentina's president, has long been a chavista-lite, harassing private business, rigging national statistics and gutting state institutions. Of late she has shifted further in Mr Chávez's direction, raiding central-bank reserves, imposing currency controls and raising trade barriers. Her most brazen move yet came this week with the nationalisation of 51% of YPF, the former state oil company, belonging to Spain's Repsol. For Argentina, it is a disaster.

Perhaps Ms Fernández will enjoy a boost in popularity at home (see article). YPF is a symbol of national pride, and her cash-strapped government would welcome its revenues. Moreover, Argentina faces an energy shortage that the government has plugged with expensive imports, devouring the country's budget and trade surpluses. Under state ownership, YPF may try to squeeze yet more out of dwindling fields.

But none of this can conceal what a mistaken path Ms Fernández has chosen. The likely long-term effects of politicising YPF's management and sucking out profits are clear from the oil industry in Venezuela where, under Mr Chávez in the past decade, output has tumbled. Ms Fernández blames Repsol for failing to invest in her country's vast new reserves of unconventional gas and oil, but nationalisation itself will discourage billions of dollars of private investment. Meanwhile, draconian price controls, the real cause of Argentina's underinvestment in energy and over-consumption of it, remain in place.

The effects of nationalisation will be felt far beyond energy. Spain is Argentina's biggest foreign investor. After seeing YPF's fate, Spanish banks, utilities and telecoms firms may also look for the exits. Ms Fernández has also endangered Argentina's trade relations with Europe, one of its biggest export markets, and probably cost her country supporters for its claim to the Falkland Islands, another nationalist rallying cry.

Such recklessness should serve as a warning, most urgently to Argentines themselves. Ms Fernández's supporters have floated a constitutional reform that would install a parliamentary system and let her stand for unlimited re-election. To stop this dangerous idea the opposition will have to unite, something it failed to do for the 2011 presidential vote. Again, look to Venezuela, where the opposition held a primary this year and coalesced around a single challenger to Mr Chávez.

Oh what a circus, oh what a show

Argentina's lurch to the left is also a warning to its social-democratic neighbours. Although some political leaders in Chile and Mexico have denounced the nationalisation (partly because Mexico's state oil company owns a stake in Repsol), Uruguay's president and Brazilian energy officials have praised it—just as their countries looked the other way when Mr Chávez ransacked property rights in Venezuela. Those governments are risking their own reputations as safe places for investment.

The world should stop indulging Ms Fernández. Argentina remains in default on its debt to the Paris Club of sovereign creditors, and has not paid the sums that the World Bank's International Centre for the Settlement of Investment Disputes has determined it owes foreign companies. Last month the United States suspended duty-free access for some Argentine exports. Yet the country still belongs to the G20 and can borrow from multilateral organisations, and its citizens can visit all of Europe without a visa. That amounts to a free pass in foreign policy. If the West revokes these privileges, Argentines might see the true cost of their president's antics.