Brazil's Supreme Court voted early Friday to reject a motion seeking to block an impeachment vote in the lower house of Congress against President Dilma Rousseff, sharply limiting the embattled leader's options to avoid a showdown with legislators who want to oust her.

Rousseff has lost support of key allies this week and is now even closer to a major defeat that would weaken an already struggling administration dealing with problems on many fronts: the worst recession in decades, a sprawling scandal at state oil company Petrobras and an outbreak of the Zika virus, which can cause devastating birth defects.

Justices voted 8-2 to deny Rousseff's appeal, saying it wasn't their role to get involved at this stage of the process, which the top legal official in Rousseff's government called "contaminated." The majority of judges argued the lower house's role in impeachment proceedings is to consider whether to accept accusations against Rousseff and if it does so, the Senate will have a trial to fully examine them.

The only good news for the Rousseff in the special session that ran past seven hours was a statement by Chief Justice Ricardo Lewandowski suggesting that in the future the court could again look at the impeachment proceedings.

"Impeachment is a political action, yes. But who said that political actions can't be debated by the Judiciary?" said Lewandowski, one of the two justices who voted to back the president's motion.

Justices began their session discussing whether the procedures set for Sunday's impeachment vote by the Chamber of Deputies were valid.

Initially, lower house Speaker Eduardo Cunha, a strident foe of the president, organized the vote to begin with legislators from the industrial and rich south, where the opposition to Rousseff is strongest.

But while the justices were meeting, Cunha's lawyer presented a different plan that would alternate between the south and the north, where Rousseff has more support. The court decided to keep Cunha's revised plan.

The top court had not been expected to rule on Thursday, but then Lewandowski said that "exceptional situations require exceptional measures."

The late meeting of 10 justices was the latest development amid weeks of legal wrangling over a process in Congress that has exposed deep divisions in Latin America's largest country.

The lower house's vote on whether to impeach Rousseff is based on allegations that she broke fiscal rules to mask budget problems by shifting around government accounts.

In filing Rousseff's motion Thursday, Solicitor General Jose Eduardo Cardozo argued Cunha had presented the impeachment push in such a way that went beyond the actual accusations against Rousseff.

Cardozo made the same claim about the report submitted to the special congressional committee that voted Monday to send the impeachment measure to the full Chamber of Deputies. He said the discussion was "contaminated" because it included the overall political crisis, the recession and unrelated corruption probes.

"We are not talking about the merits of impeachment" but rather the process, Cardozo told reporters Thursday afternoon in Brasilia.

After the court's decision, when journalists asked Cardozo whether Rousseff would still try to block the vote Sunday, Cardozo said: "We are going to analyze this process step by step."

Cardozo added that the government can go to the Supreme Court to discuss the merit and that it will be done "at the appropriate time." He did not elaborate.

The pro-impeachment camp needs two-thirds of the 513 votes in the lower house, or 342 votes, to send the proceedings to the Senate for a possible trial. If the Senate agreed to take it up, Rousseff would be forced to step down until the measure was voted on.

Both government and opposition forces say they have enough votes to win Sunday, but daily counts by Brazilian media suggest the opposition is much closer to victory.