Former Brazilian leader Luiz Inacio Lula da Silva appealed to his running mate Fernando Haddad on Tuesday to replace him in next month's presidential election, and he withdrew from the race after being banned from seeking a new term.
The change was approved at a meeting of the Workers Party in the southern city of Curitiba, where Lula has been detained since April for corruption, while the clock marked the expiration of the period ordered by the court to appoint an alternate.
"The decision has been made," a party official told AFP.
Hundreds of followers of Lula gathered near the prison where he is being held. Haddad was expected to read a letter from his mentor there, anointing him as his political heir.
The decision comes less than two weeks after Brazil's Supreme Electoral Court ruled that the popular but polarizing former president can not run while serving his 12-year prison sentence.
Although he was imprisoned, Lula, 72, was the favorite in the polls, and his elimination from the race has turned the field around, catapulting right-wing populist Jair Bolsonaro.
Bolsonaro, a polarizing figure who has been criticized for outbursts deemed racist, misogynistic and homophobic, was stabbed while on campaign trail last week.
He is not expected to appear at any rally before the October 7 election, but he remains on the ballot.
Haddad, a former mayor of Sao Paulo who also served as Lula's education minister, faces a race against time with the first round of voting less than a month away.
His ability to hold on to Lula's base will be key if he and his future running mate, young Communist Manuela D'Avila, reach the second round, scheduled for October 28.
Clean blackboard rules
Haddad's political career put him at the center of the Workers' Party, but without leaving Lula's shadow, and the 55-year-old man has shown little of his mentor's star power.
A survey published Monday by Datafolha shows Haddad with nine percent support, five points more than a month ago.
That puts him in a mix of candidates who aspire to go to a second round of voting against Bolsonaro, who is currently at the front with 26 percent.
Lula supporters have camped in front of the federal police headquarters in Curitiba since his imprisonment.
The city is the epicenter of an extensive corruption investigation that has prosecuted dozens of politicians and business leaders, including Lula, who was president from 2003 to 2011.
He was convicted in July 2017 for accepting a bribe from a Brazilian construction company in the form of a luxury apartment by the sea in exchange for contracts with state oil company Petrobras.
Numerous appeals of sentencing and sentencing have failed, and his lawyers have also been unable to circumvent the rules that have kept Lula out of the vote.
He faces trial in five other cases, but insists that he is the innocent victim of prosecutions motivated by political motives to keep him out of the office.
A former metalworker, Lula rose as a union leader during the Brazilian military dictatorship, co-founding the Workers' Party in 1980.
His presidency was credited with having taken millions of people out of poverty through generous social programs, transforming his party into a political power.
He has won the last four presidential elections, the last two by Dilma Rousseff, the successor chosen by Lula who was overthrown by Congress in 2016, accused of manipulating federal budgets.
The current president Michel Temer, vice president of Rousseff, replaced her.