(Adds ministers back Rousseff; heads of two agencies quit)
By Anthony Boadle
BRASILIA, March 14 (Reuters) - Record protests against President Dilma Rousseff have all but guaranteed her impeachment by pushing hesitant lawmakers from Brazil's biggest party to favor her ouster, party sources said on Monday.
The Brazilian Democratic Movement Party (PMDB), the biggest partner in Rousseff's governing coalition, is poised to vote against her in ongoing proceedings in Congress to impeach the president. Rousseff is beset by a corruption scandal and an economy suffering its worst recession in decades.
Massive turnout for nationwide protests on Sunday tipped the balance within the PMDB, three senior party sources said. Over 1 million Brazilians took to the streets to call for Rousseff's removal.
"Impeachment is inevitable," said one of the three senior PMDB officials, who is close to the government but spoke on the condition of anonymity.
Though the party is notoriously fickle, with no fixed ideology and a longstanding ability to swing with the prevailing political winds, the PMDB has been increasingly reluctant to continue supporting Rousseff.
In a vote at a party convention on Saturday, it resolved to make a final decision on whether to continue supporting Rousseff within 30 days.
Even so, many variables could affect Rousseff's political straits.
One important PMDB faction of legislators from Rio de Janeiro still supports the government because the state, which is run by the party, is reliant on federal funds for many ongoing projects.
And former President Luiz Inácio Lula da Silva, an able negotiator and longtime ally of the PMDB, might join Rousseff's government and help soothe strained relations.
Still, after Sunday's large turnout, PMDB officials said they could be ready to formally vote Rousseff from office by the end of May, or even sooner. The impeachment effort, which began last year, is driven by accounting irregularities in the government budget.
Rousseff, who is 15 months into her second term and helms the 13th year of government for the ruling Workers' Party, has repeatedly called the impeachment effort baseless.
In a statement on Sunday, the government acknowledged the protests and praised their peaceful nature.
PMDB officials said the protests swayed party members because they confirmed recent opinion polls showing that most Brazilians want to see Rousseff impeached.
In a speech in the Senate, Romero Jucá, the PMDB's deputy leader, called the demonstrations "crippling, alarming, decisive and explicit in showing the will of the vast majority of Brazilians."
Party officials say PMDB senators who backed the government until days ago have changed their stance. For Rousseff, support in the Senate is crucial because until now the chamber has been more loyal to her government than the lower house.
According to Brasilia-based consultancy Arko Advice, Rousseff's impeachment is just a question of time.
"The protests confirmed that President Rousseff has lost support on the streets after losing control of the economy and the political situation," said Arko partner and political scientist Lucas de Aragão.
Shares in Brazilian companies and the country's real currency have surged in recent weeks as investors bet that a change in government would lift business and consumer confidence. On Monday, however, the real and stocks fell on doubts about what a post-Rousseff government might look like.
If Rousseff lost an impeachment vote, Vice President Michel Temer, the PMDB leader, would succeed her. Six other PMDB officials also hold cabinet posts in Rousseff's government.
Oxford Economics, another consultancy, said a temporary PMDB-led government could speed up structural reforms and stop Brazil's decline, though just a change of government might not be enough for a recovery.
Rousseff called the PMDB ministers to a meeting where all six pledged to support her government and oppose impeachment. But the PMDB leadership in the state of Santa Catarina decided to break with Rousseff, and its members resigned as heads of national tourism agency Embratur and state utility Eletrosul.
The administration is hoping to rally what is left of its support base, historically labor unions and other organized leftist groups. Some of the groups have called for demonstrations to defend the government Friday.
Rousseff has also offered to bring Lula into the cabinet.
The former president himself faces charges in the corruption scandal but his presence in the government could lend order to an increasingly chaotic administration. It would also shield Lula from legal charges because ministers, under Brazilian law, can only be tried by the Supreme Court.
Sao Paulo state prosecutors have requested Lula's arrest for allegedly benefiting from graft money generated by bribery and kickback schemes uncovered at state-oil company Petroleo Brasileiro SA.
The PMDB has its own reasons to hasten Rousseff's impeachment. Several top party figures, including the speaker of the lower house, Eduardo Cunha, are under investigation in connection with the scandal.
"Impeaching Rousseff will help them avoid prosecution by reducing political pressure on the investigation," said Gabriel Petrus, an analyst with business consulting firm Barral M Jorge.
Impeachment would also make it less likely Brazil's top electoral court could annul Rousseff's 2014 re-election for allegedly using Petrobras graft money as campaign funding. Because Temer won the vice presidency as Rousseff's running mate, a ruling against her in that case would annul his election too. (Additional reporting by Lisandra Paraguassú; Editing by Daniel Flynn, Paulo Prada, Alistair Bell and Leslie Adler)