* Polls show most Argentines favor the expropriation
* Spain, in reprisal, halts imports of Argentine biodiesel
* Attention turns to how much compensation Argentina will pay (Recasts, adds lower house committee vote, context)
BUENOS AIRES, April 26 Argentina stepped toward nationalizing its biggest oil company on Thursday when the government's expropriation bill sailed through the Senate and then a lower house committee, setting the stage for final legislative approval next week.
The rapid-fire votes by the full Senate and a joint committee of the Chamber of Deputies underscored broad domestic support for a proposal that has infuriated foreign investors.
The expropriation of YPF from majority holder Repsol has widened the breach between Argentina and trade partners critical of President Cristina Fernandez's nationalist policies, including import controls that have hurt confidence in Latin America's No. 3 economy.
But that has not hurt her popularity at home. Having won a landslide re-election in October, the 59-year-old leader unveiled plans last week to seize a 51 percent stake in YPF.
The Senate voted 63-3 to approve the measure early on Thursday. Lower house member and Fernandez ally Agustin Rossi predicted the bill will get "the same level of support" when the 257-member Chamber of Deputies is expected to give final legislative approval to the YPF takeover late next week.
Once the bill passes, making the takeover permanent, a ttention will turn to the compensation Argentina will pay Spain's Repsol for its stake. Officials have already said it will be far lower than the $9.3 billion the company has sought.
The government justifies the expropriation by saying YPF was under-investing and under-producing in Argentina, a charge that Repsol dismisses.
Madrid has vowed to halt multimillion-dollar imports of biodiesel from Argentina in retaliation, while ratings agencies Moody's and S&P said the YPF seizure could heighten Argentina's economic isolation at a time of slowing growth.
Argentina's trade surplus, a pillar of Fernandez's economic policy, shrank last year as fuel imports more than doubled - sending the issue of flagging oil and natural gas production to the top of the president's list of priorities.
Buenos Aires says it needs to control YPF in order to guarantee enough domestic oil and gas output to keep the economy expanding in the face of slower demand from key trade partner Brazil and fallout from Europe's debt crisis.
State news agency Telam said on Thursday that, since being shifted to preliminary government control last week, YPF has increased gas production by almost 5 percent and oil production by 0.7 percent per day.
Most Argentines support the move to re-nationalize YPF, privatized in the 1990s after 70 years under full state control. Many blame the privatizations and free-market reforms of that decade for provoking Argentina's 2001/02 financial meltdown.
NOT A "CAPRICIOUS, RANDOM DECISION"
Argentina has yet to return to global credit markets a decade after its crippling 2001/02 sovereign debt default - the biggest in history.
With memories of this debacle still fresh, many voters have hailed Fernandez's calls for "energy sovereignty."
A survey published last weekend by polling company Poliarquia showed 62 percent of respondents agreed with the expropriation, with 23 percent against it.
"The government's bill doesn't reflect a capricious or random decision," ruling party Senator Marcelo Fuentes said. "It's a logical result stemming from the need to reverse free-market thinking in energy policy."
The president pledged during her 2011 re-election campaign to deepen the government model pioneered by her late husband and predecessor as president, Nestor Kirchner.
A fiery public speaker sometimes compared to Argentina's famous first lady Evita Peron, Fernandez has worn only black since Kirchner's sudden death in 2010 and she has dedicated YPF's takeover to his memory.
In a speech on Tuesday, Fernandez acknowledged she was nervous when she announced the YPF takeover plan: "They weren't nerves caused by doubts or insecurities. On the contrary; I'm absolutely certain that this is the only way."
"What upset me was that he (Kirchner) couldn't be here to see such a historic moment." (Additional reporting by Nicolas Misculin; Editing by David Cowell and Paul Tait)
Our top photos from the last 24 hours.