Brazil's Supreme Court rejected an appeal by the government to stop an impeachment vote set for Sunday in the lower house of parliament against President Dilma Rousseff.
Attorney General Jose Eduardo Cardozo had filed the application, emphasizing that it sought fair treatment of Rousseff, who has been under pressure to resign for months. She has been accused of hiding the extent of the budget deficit during her re-election campaign at the end of 2014.
But a majority of the Supreme Court justices voted early Friday against the government's emergency petition, arguing that Rousseff has had adequate opportunity to mount a defence.
If two-thirds of the lower house of parliament vote for the process to go forward, and that vote is followed by a simple majority in the Senate, Rousseff would be suspended for 180 days. That could mean she won't be able to open the Olympic games in Rio de Janeiro on August 5.
During the her suspension, the charges against her would be legally examined, and Vice President Michel Temer would serve as president. In October, the Senate could vote to dismiss her by a two-thirds majority and, if that happens, Temer would remain president until the end of 2018.
Temer's party has joined four other parties in deciding to break ties with Rousseff, but he remains vice president. The original nine-party coalition has shrunk so drastically that the necessary two-thirds against it, or 342 of the 513 votes, could be achieved on Sunday.
However, there is traditionally very little faction discipline, and the government is trying to win over individual deputies of the opposition.
"I'm not trying to gain time, I am just fighting for what I consider to be legal," Cardozo said of his request to the Supreme Court.
Another round of demonstrations by opponents and supporters of Rousseff are expected to take place in Brazil on Sunday.