The Brazilian Senate has voted to hold an impeachment trial of suspended president Dilma Rousseff, who is accused of breaking budget laws.
The senate voted 59 to 21 in favour of going ahead with the trial against Ms Rousseff following a marathon debate that ended early on Wednesday.
The senate suspended Ms Rousseff in May over alleged illegal accounting practices.
She says they were common practice under previous administrations.
The senate required a simple majority to decide on whether to try Ms Rousseff. A two thirds majority is needed in the final vote following the trial, which is due in the week after the Olympics closing ceremony.
As the debate got under way on Tuesday, Supreme Court President Ricardo Lewandowski told senators that they were about to "exercise one of the most serious tasks under the constitution".
Ms Rousseff has been accused of spending money without congressional approval and taking out unauthorised loans from state banks to boost the national budget ahead of the 2014 election, when she was re-elected.
Her allies in the Workers' Party have pointed out that many of the members of the Brazilian congress who have accused her are implicated in corruption cases themselves.
Ms Rousseff is not facing corruption charges in Brazil's wide-ranging scandal around the state oil company, Petrobras.
But she has been tainted by the scandal, in which her Workers' Party is accused of lining its campaign war chests with some of the missing money.
If she is removed from office, the interim president, her former running mate Michel Temer, will remain in the presidential chair until the next elections in 2018.
Ms Rousseff has accused him of orchestrating a political coup against her.
At the Olympics opening ceremony on Friday, Mr Temer drew boos from the crowds as he declared the games open.
There have been various protests against him before the games as well as peaceful protests at a number of Olympic venues.