Brazil's electoral court on Monday rejected a request by barred presidential candidate Luiz Inacio Lula da Silva's Workers' Party (PT) for an extension to a deadline to name his replacement.
The PT has until 7:00 pm (2200 GMT) on Tuesday to name a substitute candidate to include on the ballot paper for the October 7 first round of voting, or risk missing out altogether.
It has still not given up hope of forcing Lula back into the race having taken appeals to the country's supreme court and even the United Nations.
But electoral court president Rosa Weber said there was "no justification" for such an extension.
Lula was barred on September 1 from running under Brazil's "clean-slate" law due to his conviction for accepting a bribe, for which he is currently serving a 12-year prison sentence.
Until then, he had been streaks ahead of the competition in polls and looked a good bet to win a third term in office.
The 72-year-old, president from 2003-10, met with his running mate and likely replacement, Fernando Haddad, at his prison in the southern city of Curitiba last week, when he is said to have settled the question of his successor, according to PT sources.
The PT's board of directors is due to meet in Curitiba on Tuesday.
Lula's lawyers had been hoping for a deadline extension to September 17 when the court is due to settle all outstanding cases relating to the election.
As well as denying Lula's extension request, Weber sent to the federal supreme court an appeal by the former president to annul the electoral court's invalidation of his candidacy.
However, there is little chance of the court hearing the case before Tuesday.
On top of his bribery conviction, Lula is facing five other corruption-related cases, although he insists he's innocent of all charges and has branded his legal travails political persecution aimed at preventing him from standing in the election.
When he left the president's office on January 1 2011, he did so with sky-high ratings following an economic boom and widely praised social reforms to reduce poverty.
He was subsequently caught up in the sprawling "Car Wash" corruption probe that has ensnared many of Brazil's political and business elites.