The impeachment trial of suspended Brazilian President Dilma Rousseff, who is accused of breaking the budget law is set to commence after the Senate voted in favour of it.
The senate voted 59 to 21 in favour of going ahead with the trial against Ms Rousseff which is likely to be held at the end of this month.
The Senate suspended Ms Rousseff in May over alleged illegal accounting practices but she says they were common practice under previous administrations.
Following a marathon debate that ended early on Wednesday, the senate easily surpassed the required simple majority needed 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", the BBC reported.
Ms Rousseff has been accused of spending money without congressional approval and taking 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.