(Adds Breakingviews link)
By Alonso Soto
BRASILIA, July 29 (Reuters) - Finance Minister Joaquim Levy's role as Brazil's dominant economic policymaker is slipping as he tries to push through unpopular austerity measures aimed at saving the country's investment grade rating.
In a somber briefing alongside Planning Minister Nelson Barbosa last week, Levy announced a drastic cut in fiscal savings targets for this and the next two years, shocking markets and sparking a sell-off of Brazilian assets.
While it was partly forced by plunging tax revenues, the less ambitious goals highlighted how Levy's influence inside the government is being tested by Barbosa, a leftist economist who argues for a more moderate fiscal adjustment.
To make things worse, Standard & Poor's on Tuesday threatened to strip Brazil of its coveted investment-grade rating, raising pressure on President Dilma Rousseff to push for austerity despite stiff resistance in Congress.
The retreat on the fiscal goals ended Levy's honeymoon with investors who until recently saw him as the champion of market-friendly policies, but now doubt he can deliver on promises to fix past mistakes.
"This is the type of thing that could ruin a love affair," said Joao Pedro Ribeiro, an analyst with Nomura in New York. "The interpretation of what happened is that he (Levy) is much weaker in the government."
Officials inside the government told Reuters that Levy remains a powerful figure who enjoys Rousseff's trust, but also that Barbosa is gaining ground.
While Levy, a former Banco Bradesco asset management executive, is pushing for aggressive austerity measures to clean up government finances and bring inflation under control.
Barbosa, who was deputy finance minister in Rousseff's first four-year term, believes the belt-tightening can be achieved without suffocating an economy already heading to its worst recession in 25 years.
"Barbosa has gained clout in this process. It's not that Levy's influence has diminished, but now he has a stronger counterpoint," said a senior government lawmaker who is directly involved in economic policy decisions. "Barbosa is ideologically closer to Dilma ... they have a close relationship."
Initially, Levy disagreed with the timing of the budget target cuts, but when the deterioration of public finances became more evident he conceded and backed Barbosa's proposal to slash them right away.
Barbosa, like Rousseff, defends the state as an important driver of economic growth.
Once considered by Rousseff for the finance minister job, Barbosa has a good working relationship with Levy, but the two could not be more different.
Barbosa attended The New School for Social Research in New York, a college known for promoting strong state involvement in the economy.
Levy is a University of Chicago-trained economist who worked for the International Monetary Fund and supports a more orthodox, classical belt-tightening to encourage private investment.
In a first sign of his rising influence, Barbosa convinced Rousseff to opt for a more moderate budget cut in May than the one Levy had proposed. That angered Levy, who skipped the official announcement in protest, government officials said.
Levy later said a bad flu prevented him from attending the news conference.
"The pressure for Rousseff to avoid a deeper recession has strengthened Barbosa's position," said Alex Agostini, chief economist for Sao Paulo-based Austin Rating, which cut Brazil's debt rating to junk last week.
"That's undoubtedly negative because it means the government will not implement the measures needed to put the house in order."
A rebellious Congress is not making Levy's job any easier.
Trying to distance themselves from Rousseff, who is struggling with record-low approval ratings, lawmakers of the government's coalition have watered down austerity measures and passed legislation to bolster spending.
A deepening political crisis stemming from a corruption scandal at state-run oil giant Petrobras threatens to spoil Levy's plan to pass a bill that hikes corporate taxes and offers an amnesty on undeclared assets abroad. Together, they could bring nearly 40 billion reais ($11.89 billion) in revenue a year.
Levy has taken the unusual step of leading negotiations with lawmakers on the tax hike and amnesty package despite public resistance to austerity from some inside Rousseff's own Workers' Party.
For those legislative battles, Levy will likely continue to enjoy the backing of Rousseff, who knows she needs his help with investors.
"Levy personifies what little credibility Brazil still has in markets," said Thiago de Aragao, a political strategist with Arko Advice who worked briefly for the government earlier this year.
($1 = 3.36 Brazilian reais)
Reporting by Alonso Soto; Editing by Christian Plumb and Kieran Murray