The Brazilian Senate is hearing prosecution and defence arguments in the impeachment case against president Dilma Rousseff ahead of a final vote on whether to remove her permanently.
On Monday Ms Rousseff mounted a forceful defence of her time leading Latin America's most populous nation.
She warned senators that ousting her would hurt a young democracy while promising to go down fighting in what many see as a losing battle.
Ms Rousseff, who has been suspended since May, delivered a 30-minute address at her trial in the Senate, and was then questioned by senators for more than 14 hours.
The impeachment measure was introduced in the lower House of Deputies late last year, splitting the nation.
The turmoil continued during the hearing, as police in Sao Paulo fired tear gas against people demonstrating in support of Ms Rousseff.
Two Brazilian social groups called for protests and gathered in the city's main avenue with signs against Michel Temer, Ms Rousseff's vice president, who has been the acting leader since she was suspended.
Protests erupted in several other cities in support of Ms Rousseff, including in the capital, Brasilia.
Opposition senators accused her of breaking fiscal responsibility laws to hide holes in the budget, saying that exacerbated a recession which has led to 10% inflation.
She called that nonsense, contending she broke no laws and noting that previous presidents used similar accounting measures.
She said she was forced to make tough choices on the budget in the face of declining revenues and a refusal by opponents in Congress to work with her.
If anything, she said, the impeachment process had hurt the economy, placing the blame on the opposition, which has argued that she has to be removed for the financial climate to improve.
"I know I will be judged, but my conscience is clear. I did not commit a crime," she told senators.
For Ms Rousseff to be removed, at least 54 of the 81 senators need to vote in favour.
Counts by local media said 52 senators plan on voting for removal, while 18 are opposed and 11 have not said one way or another. In May, the same body voted 55-22 to impeach and suspend her.
"I need all of you, regardless of political parties," Ms Rousseff said in her closing remarks to senators, urging them to keep her in her job.
She reminded them that she was re-elected in 2014 with more than 54 million votes.
Ms Rousseff asserted that impeachment was the price she had paid for refusing to quash a wide-ranging police investigation into the state oil company Petrobras.
She said corrupt politicians conspired to oust her to derail the investigation into billions in bribes at the oil giant.
The investigation has led to the jailing of senior businessmen and politicians, including from her Workers' Party.
Brazil’s suspended President Dilma Rousseff defends her record at a Senate impeachment trial on Mondayhttps://t.co/4l3ihbIwQV— CGTN (@CGTNOfficial) August 30, 2016