(Adds details on parties, political and economic context)
By Anthony Boadle
BRASILIA, March 6 (Reuters) - Brazil's Supreme Court will investigate the speakers of both houses of Congress and 32 other sitting politicians in connection with a multibillion-dollar kickback scheme at state-controlled oil company Petrobras .
The scandal has shaken the political establishment and undermined support for President Dilma Rousseff, who was narrowly re-elected last year and is struggling to stave off an economic recession and a downgrade by credit rating agencies.
A court official said on Friday that 12 senators and 22 congressmen from five parties are under investigation, all but one from Rousseff's governing coalition. The most prominent are the president of the Senate, Renan Calheiros, and the Speaker of the Chamber of Deputies, Eduardo Cunha, both of the PMDB, Brazil's largest party and Rousseff's main coalition ally.
The Progressive Party has 21 members under investigation, the PMDB six and the Workers' Party five, including Senator Gleisi Hoffmann, Rousseff's chief of staff during her first term. The party's treasurer João Vaccari will be investigated.
Only one opposition politician, Senator Antonio Anastasia, of the PSDB party, was on the list, which includes Senator Fernando Collor de Mello, a former president who resigned in 1992 to avoid impeachment for corruption.
Under Brazilian law, elected politicians can only be tried by the highest court, which must now decide with the help of prosecutors whether there is enough proof to put them on trial.
The investigation could take years. Brazil's largest political corruption case until now, involving monthly payments to lawmakers in return for support in Congress for Rousseff's Workers' Party, took seven years to get to trial in 2012.
The immediate casualty of the political crisis could be Finance Minister Joaquim Levy's belt-tightening plan to bridge Brazil's gaping fiscal deficit and avert a rating downgrade.
In a surprise setback on Tuesday, Senate President Calheiros threw out an austerity measure decreed by the president for what he called procedural reasons, though it appeared to be retaliation for not clearing his name from the corruption probe.
"The political situation is going to get even worse for the president," a senator in the ruling Workers' Party told Reuters, on the condition that he not be named.
"There is a widespread feeling among the political class, especially in the PMDB, that the government manipulated the list of the lawmakers involved in the investigation to lessen the damage for the Workers' Party," the senator said. He said lawmakers were planning to block other austerity measures.
Rousseff faces more trouble in Congress from a parliamentary inquiry commission set up to look into the corruption scandal. Its first witness called to testify will be former Petrobras manager, Pedro Barusco, who has said in a plea bargain statement made public that the Workers' Party received up to $200 million from bribes paid on Petrobras contracts.
The scandal threatens Brazil's already weak economy by prompting Petrobras to halt or cancel key investment projects. Companies in the energy and construction sectors are finding it harder to obtain credit.
The corruption probe has so far led to 40 indictments on racketeering, bribery and money laundering charges, including two former Petrobras senior managers and 23 executives from six of Brazil's leading construction and engineering firms.
Rousseff was chairwoman of Petrobras' board of directors from 2003 to 2010, when much of the alleged corruption took place. She has denied knowing about the scheme during those years and has vowed to respect the judiciary's independence.
Brazil's real currency tumbled 7 percent in the week to 3.05 per dollar on Friday, it lowest close since 2004, and stocks retreated more than 3 percent, on investor worries that the political storm will hinder a fiscal adjustment and cause Brazil to lose its investment-grade credit rating. (Reporting by Jeferson Ribeiro, Maria Carolina Marcello and Guillermo Parra-Bernal; Editing by Chris Reese, Andre Grenon and Lisa Shumaker)