Dilma Rousseff is about to be out of a job temporarily.

An all-night Senate debate in Brazil ended with a decisive result: the country's first female president must step aside while an impeachment trial against her gets underway.

That means Rousseff will be on the sidelines, fighting for her political future, when the Olympics come to Brazil in August. Vice President Michel Temer will serve as interim president.

Speaking through the night, senators made their cases ahead of the electronic vote, which took hours and ended in Rousseff's temporary removal from office.

Fifty-five of the 81 members of the upper house voted in favor of the motion early Thursday, with 22 voting against.

The past few months have been a roller coaster for the embattled leader, who has been at the center of a fight for her impeachment, including procedural and legal appeals to annul the vote in the legislature.

The Senate and its committees will continue to work normally during this period.