Supporters of an oil nationalization bill proposed by Argentina's President Cristina Fernandez hold up flags that read “Fight and return YPF” in Spanish outside Congress as senators debate the bill in Buenos Aires, Argentina, on April 25. (Natacha Pisarenko/AP)

Argentina’s hostile takeover of YPF, a Spanish-owned oil producer that is the largest energy company here, was to many economists a blunder that would only curtail foreign investment in a country starving for cash.

But as Argentina’s congress on Thursday night approved the expropriation of Repsol’s prized affiliate, President Cristina Fernandez de Kirchner’s government was gambling that the recent discovery of what could be billions of barrels of oil and gas in Patagonia would be too big a lure for energy companies to pass up. Unable to muster state money and lacking in technology, the government needs oil companies to spend $25 billion a year to bring cutting-edge technology and unlock the bounty from an oil and gas formation, dubbed Dead Cow, in the huge Neuquen basin.

For those companies with the capital and know-how — including such giants as Exxon Mobil and Chevron — the possibilities may prove irresistible, said economists and oil analysts here and in the United States.

“There are a lot of companies that still want to do business there, and the good thing for those companies is that Argentina needs the capital and the know-how and the technology,” said Larry Goldstein, director of the industry-supported Energy Policy Research Foundation in New York. “Argentina, on the energy side, is going to get away with it. It won’t necessarily backfire on them.”

On the surface, Argentina’s move against YPF — which included cutting off phone lines to the company’s headquarters and forcing executives out — has shaken investors and solidified Argentina’s place as a financial rogue. A decade ago, Argentina recorded the biggest debt default in history, $100 billion. Argentina also refuses to pay its debts to the Paris Club of nations and, according to the Obama administration, has repeatedly ignored judgments made against it by the World Bank’s arbitration body in favor of U.S. companies.

Now, Argentina’s image, at least to foreign investors and markets, has been further tarnished with a lopsided 207-32 vote in the lower house that legalized the expropriation of a controlling stake in Repsol’s $18 billion affiliate.

Still, Roberto Lavagna, a former Argentine economy minister credited with lifting Argentina from economic calamity after its default, said the Dead Cow fields could be developed if Argentina works to show that it will honor contracts and create favorable conditions for energy companies.

“The key from now on is that YPF show that it is capable of playing by the rules of the game, to attract big international companies with capital and technology,” Lavagna said. “What we can be sure of today is that American companies are showing interest, Exxon and Chevron, Total of France, and the Chinese.”

The government, though, is not taking chances. Soon after the president announced the YPF takeover in a rousing, nationalistic speech on April 16, officials said that their intention was to pursue deep-pocketed investors to help Argentina develop a vast shale basin not unlike the boom fields of Texas and North Dakota. That has meant meetings with representatives from some of the dozen companies that have been investing or had plans to invest in Patagonia.

Planning Minister Julio De Vido also rushed to neighboring Brazil to meet with energy officials and executives from government-controlled Petrobras. The Brazilians did not pledge new investments, but Petrobras chief executive Maria das Gracas Silva Foster later told the Brazilian congress that her company “wants to continue investing in Argentina.”

Francisco Monaldi, the director of the Energy Center at the IESA business school in Caracas, said countries can toughen terms or even break contracts when oil and gas prices are high or deposits are huge — and companies know it.

In Venezuela, he noted, President Hugo Chavez nationalized a swath of that country’s oil industry in 2007. ENI of Italy publicly bristled at the state’s intrusion, Monaldi said, but the company later quietly acquiesced, deciding it was better to remain in Venezuela.

“Obviously, the signal you send investors is that you’re increasing risks,” said Monaldi. “But the margins are so high that they’ll take the risk because the money coming in will cover those risks.”

Until now, at least publicly, Argentina has done little to assuage investors about the country’s business climate. The president, in her speech announcing the government’s takeover of 51 percent of YPF, warned that “companies that are located here are Argentine companies.”

Then on Thursday, speeches in congress ahead of a vote on the administration’s expropriation were peppered with talk of reclaiming sovereignty over energy resources and the dangers of the kind of market orthodoxy Argentina had embraced in the 1990s.

“This neoliberalism that had subjugated our country in the last part of the past century now has only a few hours left,” said Jose Ciampini, a congressman from Neuquen province, where the shale oil and gas deposits are located.

Investing in Argentina can be full of pitfalls. There is an annual inflation rate of about 25 percent and an array of import restrictions. Energy companies also face a shifting collection of price controls and subsidies.

Oil analysts say the government’s energy policy has been a disincentive for companies to invest and increase production.

David Mares, an expert on the Latin American energy politics at the Baker Institute at Rice University, said oil companies will be closely watching for new signs from the government, weighing big risks against a rosy potential.

“The geology of Argentina makes it extremely attractive,” Mares said. “The politics of Argentina make it increasingly risky.”