Brazil’s Congress has upheld President Dilma Rousseff’s vetoes of two bills to raise public spending – a victory for the leftist leader as she tries to close a gaping fiscal deficit and regain investors’ confidence.

Opposition lawmakers on Wednesday failed to reach the absolute majority needed to override a veto of a bill to raise benefit payments to retirees. Congress late Tuesday upheld another veto to avoid steep wage hikes for judiciary employees.

The two bills would have cost the administration 47 billion reais ($12.43 billion) in extra expenditures over four years, according to finance ministry data.

Maintaining the vetoes gives a reprieve to Rousseff, who is scrambling to shore up the country’s finances to avoid deepening what is expected to be the worst economic crisis since Brazil defeated hyperinflation in the early 1990s.

Still, her narrow victory in Congress does not mean the leftist leader will have enough political support to pass a controversial fiscal savings package calling for increased taxes and reduced public spending.

“Though positive news for the administration, the vote’s narrow margin underscores anemic support in Congress for the fiscal adjustment,” said Cameron Combs, a researcher with Eurasia Group.

The opposition nearly reached the 257 votes it needed late Tuesday to override the veto on wage hikes.

Rousseff needs three-fifths support or 308 votes in the Lower House to amend the constitution and revive a financial transaction tax, known as CMPF, which represents nearly half of the austerity package worth 65 billion reais.

Widening budget gaps and surging debt levels led Standard amp; Poor’s to strip Brazil of its investment-grade rating in September. Policymakers are scrambling to prevent rival agencies from following suit, which could spark capital flight from the former Wall Street darling.

Rousseff’s level of popularity was stuck in single digits in recent polls, following a massive corruption investigation involving her Workers’ Party and coalition partners.