BUENOS AIRES, Argentina — Less than a decade ago, Argentina was an exporter of oil and natural gas. Now the government has to spend billions of dollars to import fuel. This dramatic reversal of fortune is why Argentina, already a global financial rogue after its historic debt default, is willing to risk becoming even more of a pariah by seizing control of its leading oil company from Spanish hands, analysts say. President Cristina Fernandez infuriated Spain, its largest foreign investor, but elated many Argentines by expropriating Repsol YPF SA's majority stake in Argentina's formerly state-owned YPF energy company. Only two months earlier, Repsol YPF had upped its estimate for the shale oil and gas it found in Argentina to nearly 23 billion barrels, enough to double the country's output in a decade.