When he became finance minister 10 months ago, Joaquim Levy was an uncomfortable fit in Brazil’s left-leaning government – an orthodox, University of Chicago-trained economist, a fiscal hawk with an affinity for cutting spending.

Dogged by speculation about his departure amid vocal opposition from the ruling Workers’ Party, Levy and his boss, President Dilma Rousseff, have told officials and lawmakers he is staying to see an unpopular fiscal austerity plan get through Congress, according to sources in the government and party.

After that, he may be gone, either because he is pushed out or leaves of his own volition, they say. But the mission he was hired for by Rousseff – to help restore Brazil’s credibility with investors and fix past mistakes – will be at least partly accomplished.

“It will be too costly for Levy to leave now,” said a senior Workers’ Party lawmaker who has spoken with Levy and Rousseff about the minister’s situation. “He will try to pass most of the package and very likely leave after that next year. He is very frustrated and under a lot of pressure.”

Levy, who was compelled to publicly state last week that he was not quitting, declined to comment for this article.

Rousseff believes that firing Levy now could deepen what is expected to be Brazil’s longest recession since the 1930s and would scare off some investors who see him as the only credible figure in her economic team, a presidential aide said.

“Levy doesn’t want to leave and Rousseff doesn’t want to fire him now,” said the aide, who asked for anonymity to speak freely. “But the constant speculation around his resignation and friendly fire from within the party make the situation increasingly unsustainable.”

One Workers’ Party insider suggests that party leadership can hold its nose just long enough for that plan to be approved in Congress sometime next year.

“Levy proposed an adjustment plan and he needs to lead that to its completion,” said Jose Mentor, a veteran party lawmaker. “After that, we will decide what to do.”

Levy has sought to reduce the government deficit with cuts in spending and social benefits while raising taxes. It has not been enough to generate budget savings because of resistance to his plan in Congress, prompting Standard amp; Poor’s to strip Brazil of its prized investment-grade credit rating. Other rating agencies threaten to follow suit if the accounts do not improve.

The austerity plan still requires congressional approval of additional measures next year, including Levy’s proposal to revive a hated tax on financial transactions called the CPMF to make up for falling revenues.

The question is: Can Levy, 54, withstand the pressure that long?

After party leaders spoke publicly about the need to replace him a few weeks ago, Levy complained privately to Rousseff, according to the presidential aide.

Markets dropped sharply on speculation that Levy had resigned, adding to uncertainty about Rousseff’s own future as the unpopular leader faces calls for her impeachment for allegedly disguising a growing deficit in the run-up to her re-election last year.

To calm markets and get the Workers’ Party to knuckle down and vote for Levy’s belt-tightening proposals, party founder Luiz Inacio Lula da Silva, a former Brazilian president and one of Levy’s fiercest critics, publicly endorsed him at a party meeting.

But then there’s Levy’s struggle within the cabinet, in which he is seen losing influence to Planning Minister Nelson Barbosa, a 45-year-old economist who shares many of Rousseff’s leftist ideals of social inclusion and advocates a more gradual adjustment in the government’s accounts.

The lack of coordination between the two top players in the economic team and their differences in styles and ideas have complicated negotiations on the passage of measures in Congress.

“One minister will say one thing and then you hear something else from the other,” said Ricardo Barros, a congressman from the allied Progress Party who is reviewing the 2016 budget bill. “When Levy puts his foot on the brakes, Barbosa steps on the accelerator.”

An abrupt exit by Levy would most likely deeply unsettle financial markets, but the degree of disruption would depend on his successor.

Markets would welcome the appointment of the former central bank chief under Lula, Henrique Meirelles. But they would most likely balk at the prospect of Barbosa, whom some investors regard as partly responsible for derailing Latin America’s largest economy during Rousseff’s first term by doling out tens of billions of dollars in subsidies to businesses and helping to create today’s deficit.

The more politically seasoned Barbosa, who favors a larger state role in the economy, is the preferred choice of many members of the Workers’ Party.

Lula himself has floated the name of Meirelles as Levy’s possible replacement, lawmakers close to the former president told Reuters. A spokesman for Lula said he could not confirm that was the case.

“Markets would accept Meirelles. He has a very pragmatic approach to economic policy,” said Jankiel Santos, chief economist with Haitong in Sao Paulo.

But then there’s the question of whether Meirelles would even want the job. Economists who worked with him at the central bank doubt that he would want to work under Rousseff, with whom he clashed repeatedly when both served in the Lula administration.