(Adds title in second paragraph)
By Anthony Boadle
BRASILIA, Dec 20 (Reuters) - Brazilian President Dilma Rousseff's key ally in Congress is certain it can head off an impeachment threat, but in return the party demands a radical change of policy course to pull the economy out of its deepest downturn in 25 years.
Senator Eunicio Oliveira, Senate leader of the fractious Brazilian Democratic Movement Party (PMDB), told Reuters on Sunday that Rousseff took a first step in that direction by replacing austerity-minded Finance Minister Joaquim Levy with leftist economist Nelson Barbosa, who is expected to ease up the belt-tightening to spur growth.
Levy threw in the towel after Brazil lost its hard-won investment grade last week.
Oliveira said Rousseff's position had improved with Supreme Court rulings on Wednesday that gave the upper chamber authority to reject impeachment even if the lower house votes to impeach her.
"A majority of PMDB senators are in favor of the president finishing her term," Oliveira said. "What they want is for her to change her economic policies to get the country growing again."
Oliveira said the opposition's case against Rousseff has no legal basis and is unlikely to fly in the Senate where her governing coalition has a solid majority and will stand by her.
His comments are a clear sign that Rousseff's allies from the moderate PMDB have lost patience with the austerity policies Levy advocated. Together with her own left-leaning Workers' Party, never a fan of Levy's agenda, that points to stronger support for a bid to restore growth sooner through government spending even at the risk of accelerating inflation.
In its economic agenda, the PMDB has rejected what it called fiscal austerity for the sake of austerity and advocated liberalizing labor laws and reforming of the pension system.
Brazil's deep recession and a massive corruption scandal at state-run oil company Petroleo Brasileiro SA have turned Rousseff into the country's most unpopular president in as many years, and her opponents are seeking to unseat her one year into her second term for allegedly breaking budget laws.
While the PMDB is often plagued by infighting and includes members who are staunch allies of Rousseff as well as some arch-enemies, Oliveira's stance as a senate leader can be seen as indicative of its mainstream.
"She has done nothing dishonest. Only the economic crisis can bring her down, by fueling social discontent," he said.
Impeachment proceedings against Rousseff were opened Dec. 2 in the lower house by her archenemy, the speaker Eduardo Cunha, a PMDB leader who has been charged with taking bribes. But on Wednesday, the Supreme Court ruled a secret vote Cunha used to stack an impeachment committee with lawmakers who want Rousseff ousted was invalid and needed to be held again.