Brazil's supreme court has rejected a last-minute appeal by President Dilma Rousseff to stop the Senate impeachment process against her, clearing the way for debate and a vote by early Thursday.

The president's allies argued in the Senate Wednesday that the body should delay Wednesday's debate and vote until the court ruled. Now that the supreme court has reached a decision, Rousseff appears to have lost her last opportunity to avoid being forced from office.

The Senate is now debating whether to put her on trial for corruption, after allegations she manipulated funds to hide Brazil's finances during her 2014 re-election campaign. If it does so, Rousseff would be suspended from office.

Rousseff says her political opponents, including Vice President Michel Temer, who also is also under investigation for corruption, are attempting a coup.

Brazil’s President Dilma Rousseff attends having in front a poster written in Portuguese "Dilma Stay, during ceremony of the Launch Program New Federal Universities, at the Planalto Presidential Palace, in Brasilia, May 9, 2016.

Newspaper polls have indicated that 50 senators are expected to vote in favor of a trial - many more than the majority needed. However, it is not clear that these senators would also vote to convict her.

The Rousseff impeachment proceedings were thrown into confusion Monday when the interim speaker of the lower house said last month's vote to send the matter to the Senate was invalid. He said Rousseff never had an opportunity to defend herself, making the impeachment vote illegitimate.

However, he later reversed himself, and Senate leader Renan Calheiros said the debate and vote would go ahead Wednesday as scheduled.