Brazil's Supreme Court has rejected a government injunction aimed at preventing an impeachment vote against President Dilma Rousseff.
Ms Rousseff, who says her opponents are plotting a "coup", faces claims she manipulated government accounts.
She has vowed to fight to "the last minute" despite the desertion of three allied parties ahead of Sunday's vote in the lower house of parliament.
The Supreme Court made its decision in an extraordinary session.
The impeachment debate in the lower house of parliament is due to start later on Friday and continue until Sunday's vote. If two-thirds of MPs vote for impeachment, the motion will pass to the Senate.
An impeachment vote would pave the way for Ms Rousseff to be removed from office.
Thursday's injunction to suspend the vote was filed by Attorney General Jose Eduardo Cardozo who claimed that alleged procedural failings had violated the president's right to a defence.
Seven of 10 justices voted to reject the motion even before the Supreme Court session had finished.
The Progressive Party (PP), which quit the coalition on Tuesday, says most of its 47 MPs would vote for the impeachment, and the Republican Party (PRB) said its 22 members had been told to vote in favour.
The move comes weeks after the PMDB, the largest party in the lower house, voted to leave the coalition. The PMDB's leader in the lower house, Leonardo Picciani, said on Thursday that 90% of the party's members would vote to impeach Ms Rousseff.
MPs from her own Workers' Party are said to be increasingly despondent about Sunday's vote.
The allegations, which Ms Rousseff denies, are that she juggled the accounts to make her government's economic performance appear better than it was, ahead of her election campaign two years ago.
The president's supporters say the issue is not valid grounds for impeachment.
On Tuesday, Ms Rousseff seemed to suggest that her Vice-President, Michel Temer, was one of the ringleaders of the "coup" attempt against her.
She said a widely distributed audio message of Mr Temer appearing to accept replacing her as president was evidence of the conspiracy. However, she did not identify him by name.
Brazil is "living in strange times", she said, "times of a coup, of farce and betrayal".
MPs are due to start debating on Friday, with voting beginning on Sunday at about 14:00 (17:00 GMT). The result should be known later in the evening.
Security is expected to be stepped up around the Congress building in Brasilia as the vote takes place.
While President Rousseff's opponents say the impeachment is supported by most Brazilians, the president's supporters have labelled it a flagrant power grab by her political enemies.
If the president and Mr Temer were both suspended from office, the next in line to assume the presidency would be lower house speaker Eduardo Cunha.
However, he is facing money-laundering and other charges.
What happens next?
Lower house vote: An impeachment vote is expected in the lower house on Sunday. A two-thirds majority is required for it to go forward to the Senate.
Senate vote on trial: If Ms Rousseff case is sent to the Senate, a simple majority is enough to suspend her for up to 180 days while she is put on trial. Vice-President Michel Temer would step in during this period.
Impeachment vote: For Ms Rousseff to be removed from office permanently, two-thirds of the Senate would have to vote in favour. Mr Temer would remain president for an interim period should this happen.