By Lisandra Paraguassu
BRASILIA (Reuters) - Brazil's interim President Michel Temer denied on Wednesday allegations that he sought campaign funds for his party stemming from a graft scheme at state oil company Petrobras <PETR4.SA>, implicating him in the country's biggest ever corruption scandal.
A plea deal by former Petrobras executive Sergio Machado, made public by the Supreme Court on Wednesday, said a campaign contribution requested by Temer was made legally by engineering group Queiroz Galvao but resulted from a kickback on contracts with Petrobras.
The testimony is the first to link Temer to the Petrobras investigation, known as "Operation Car Wash." Dozens of executives and politicians have been jailed due to the probe into the scandal, which has added to Brazil's worst recession in decades.
Temer's office denied that he had solicited illegal contributions from Machado, adding that he had always followed campaign finance laws.
The allegations threatened to further unsettle Temer's month-old, center-right coalition. Two ministers already resigned after leaked recordings in Machado's plea bargain deal suggested they favored interfering in the investigation.
News of the allegations overshadowed the announcement of a constitutional amendment to cap the growth of public spending for up to 20 years, a flagship economic initiative by the one-month-old Temer government and the most important fiscal policy shift in decades.
Brazil's currency <BRBY> swung sharply, losing value against the dollar before recovering after the U.S. Federal Reserve's decision to leave interest rates unchanged.
Temer was vice president until May, when President Dilma Rousseff was suspended from office to face trial in the Senate on charges of breaking budget laws.
Leaked testimony in recent weeks disclosed that Machado, a retired senator and former head of Petrobras' Transpetro shipping and natural gas transportation unit, told prosecutors Senate President Renan Calheiros and former Planning Minister Romero Juca planned to obstruct the investigation once Temer took office.
The plea bargain documents made public on Wednesday revealed the first formal accusations against Temer himself.
In particular, Machado's testimony describes a meeting with Temer at an air base in the capital Brasilia in late 2012, a tough period for the Sao Paulo mayoral campaign run by Gabriel Chalita of Temer's Brazilian Democratic Movement Party (PMDB).
"The context of the conversation made clear that what Michel Temer was arranging with (Machado) was for him to solicit illegal funds from companies that had contracts with Transpetro in the form of official donations," he said in signed testimony.
The mounting accusations against Temer and his government have rattled his congressional coalition, threatening to shake loose key swing votes in the trial against Rousseff, which is expected to confirm her removal in mid-August.
As many as a dozen of the 55 senators who voted last month to put Rousseff on trial are now undecided, according to surveys by Brazilian media. If just a couple of them change sides, the Temer camp would lose the 54 votes it needs - two-thirds of the 81-seat Senate - to convict Rousseff.
The fact that Machado said Temer had asked for a legal donation reduces the damage of the allegations and should not impact voting in the impeachment trial, according to the ARKO Advice consultancy, which puts the odds of the Senate confirming Temer as president at 90 percent.
"It is extremely uncomfortable for Temer, but far from fatal, since the senators will be voting between Dilma and Temer, and in this comparison, Temer still beats Dilma," said Arko partner Lucas de Aragão.
Brazil's political establishment is holding its breath as suspended House Speaker Eduardo Cunha, also of the PMDB, comes closer to losing his seat after a congressional ethics committee voted on Tuesday to oust him.
If Cunha leaves office, he will lose the partial immunity enjoyed by elected politicians, allowing him to be prosecuted by lower courts in several corruption cases brought against him and opening the possibility of another blockbuster plea bargain.
Machado said in the plea deal that during his tenure at Transpetro, the PMDB received some 100 million reais ($29 million) in political kickbacks from Petrobras contractors.
Operation Car Wash, named for its beginnings tracking small-time money laundering operators, has identified some 6.4 billion reais of bribes linked to contracts at state-run enterprises and federal ministries.
(Reporting by Lisandra Paraguassu; Additional reporting by Eduardo Simoes, Guillermo Parra-Bernal and Anthony Boadle; Writing by Daniel Flynn and Brad Haynes; Editing by Tom Brown and Alan Crosby)