BRASILIA (Reuters) - Brazilian President Michel Temer has burned through political capital fighting corruption charges and is struggling to push forward his economic agenda meant to rein in a gaping budget deficit.

Brazil's President Michel Temer reacts during a ceremony in Sao Paulo, Brazil August 8, 2017. REUTERS/Leonardo Benassatto

Even allies in Congress now doubt he can achieve anything but watered-down measures, likely delaying any fix to Brazil’s fiscal crisis until the economy recovers from deep recession.

With continued deficits, Brazil risks further downgrades in its credit rating. It lost its investment grade two years ago, adding to the cost of financing mounting public debt.

In a sign of Temer’s failure to restore fiscal health, the government is expected to revise upward its 2017 and 2018 deficit targets on Monday due to falling tax revenues in an economy that is barely growing.

More pessimistic analysts worry the insolvency already faced by some Brazilian states that cannot pay employees or provide basic services will reach the federal government.

Temer had a window to pass a pension overhaul earlier this year, but it closed in May when allegations emerged that he condoned bribes in a taped conversation with the then CEO of the world’s largest meatpacker JBS S.A..”We are dancing samba at the edge of the precipice,” said Sao Paulo-based wealth manager Fabio Knijnik. “I don’t see the political class at all concerned with resolving this.”

The deeply unpopular president won enough backing in Congress on Aug. 2 to block a corruption charge that could have led to his suspension pending trial by the Supreme Court. To survive, he approved about $1.5 billion in pork barrel spending to keep lawmakers happy.

His closest ally in Congress, the center-right Democrats Party of Speaker Rodrigo Maia, does not believe Temer has the 308 votes, or three-fifths of the lower chamber, needed to pass pension reform, the key measure in his fiscal rescue plan.

Speaking in Rio on Friday, Maia said Temer’s political troubles and lower-than-expected tax revenues had created the crisis. He said Brazil had no alternative but to seek whatever pension fix it could, given Congress would not raise taxes.

Congressman Efraim Filho, the Democrats whip, told Reuters Temer must dilute the pension bill to get it past Congress. He said the measure had to be stripped down to its most important provision, a minimum age for retirement of 65 years for men and 63 for women in a country where people only work on average until age 54.

CRUMBLING COALITION

Temer’s government coalition is in disarray. Parties who stood by the president are now demanding they be rewarded with cabinet positions, such as the big-budget Cities Ministry. It is now controlled by the Brazilian Social Democracy Party (PSDB), which split over whether to abandon the scandal-plagued president.

Until they get their way, the allies at the core of his coalition have said they will not put his proposed pension bill to the vote. Maia said the “climate” was not right to move to a floor vote and the bill could languish and miss a legislative window likely to close in December as an election year approaches in 2018.

The government has already made concessions on the pension bill provisions that will reduce planned fiscal savings by up to 25 percent in 10 years and nearly 30 percent in 30 years, according to Finance Minister Henrique Meirelles.

The pension overhaul is vital for Brazil to comply with a 20-year spending cap that was Temer’s first move to restore fiscal discipline, albeit without a full impact on accounts until 2019.

“That ceiling was like saying you are going on a diet two years from now,” said Daniel Freifeld of Callaway Capital, a Washington D.C.-based investment firm.