Brazilian President Dilma Rousseff put up a strong effort Sunday to dissuade deputies in the lower house of parliament from voting in favour of impeachment.
After spending the last days drumming up political and public support against her ouster, the Rousseff camp worked until the last minute in an attempt to head off the impeachment question.
She was fighting to prevent a two-thirds majority from forming against her, as cohesion within political factions is traditionally low in Brazil.
At the beginning of the voting process there were tumultuous scenes in the streets of the capital, Brasilia, and in the lower house chamber calls of "Workers Party out" accompanied by a war of words between opponents and supporters of the president's Workers Party (PT).
Members of the PT responded to the opposition by saying there must be no coup. They showed a banner reading Away with Cunha, referring to Parliament President Eduardo Cunha, who has been a leading supporter of the case against Rousseff although he is accused of accepting a 5 million US dollar bribe.
Rousseff has been under pressure to resign for months, accused of hiding the extent of the budget deficit during her re-election campaign at the end of 2014.
Rousseff's approval rating, currently at only 10 per cent, has also been battered by recession as the resource-dependent economy took hits from a bust in commodities markets and slowing global economy.
The impeachment debate in the lower house on Sunday was taking place less than four months before the Olympic Games in Rio de Janeiro. The mood in the country has reached a new low as it copes with a deep recession, dozens of politicians embroiled in corruption scandals and millions of people without work.
Across the country, hundreds of thousands of opponents and supporters of the PT took to the streets as the call for new elections in view of the deadlock grows louder.
Rousseff appealed earlier Sunday to the Brazilian people in a video message, warning of a coup and saying her impeachment would likely lead to cuts in social programmes.
If two-thirds of the lower house of parliament vote for the impeachment process against Rousseff to go forward, and that vote is followed by a simple majority in the Senate, Rousseff would be suspended for 180 days.
That could mean she won't be able to open the Olympic Games on August 5 in Rio de Janeiro.
During the her suspension, the charges against her would be legally examined, and Vice President Michel Temer, 75, would serve as president.
In October, the Senate could vote to dismiss her by a two-thirds majority and, if that happens, Temer would remain president until the end of 2018. Temer, whose centrist Brazilian Party for Democratic Movement (PMDB) has broken with Rousseff, accused her of lying on Twitter.
If the two-thirds majority isn't reached, the proceedings against her would be stopped.
A result is expected late Sunday or early Monday.