SAO PAULO (AP) — Brazil's left-leaning Workers' Party announced Monday that former Sao Paulo Mayor Fernando Haddad will become its presidential candidate if, as expected, jailed ex-President Luiz Inacio Lula da Silva is barred from running in the October election.

The announcement by party chairwoman Gleisi Hoffman immediately propels a candidate who has barely registered in the polls thus far to one of the leading contenders to become Brazil's next president.

Hoffmann said that Haddad "will travel nationwide carrying Lula's voice," making him a surrogate for a once wildly popular leader who still garners much support despite mounting legal problems. Polls show da Silva with a clear lead in this year's race even though a corruption conviction will almost certainly will block his candidacy.

Da Silva says he is innocent and is still appealing the conviction, which by law makes him ineligible to run for office. However, Brazil's electoral court makes final decisions on candidacies, and the Workers' Party is holding out hope of the political equivalent of a miracle as the election approaches.

A 55-year-old economist, lawyer and university professor, Haddad was education minister under Workers' Party Presidents da Silva and Dilma Rousseff, then won election as mayor of Brazil's largest city in 2012. Improvements his administration made to transportation infrastructure in Sao Paulo along with a drug reduction program helped give him a reputation of a modernizing and competent steward.

But he proved an uncharismatic politician and failed to even make the runoffs in his attempt at re-election in 2016. In that way, the party is gambling that voters will support a candidate whose communication often comes across as academic and uninspiring simply because da Silva picked him.

While many on the left may question picking Haddad, da Silva didn't have many choices. Some more popular members of the party have been jailed for corruption or have cases against them. Others lost re-election bids in 2016 amid tanking popularity of the party, while others decided to sit out this presidential race and instead go for congressional, senate or gubernatorial seats.

Even so, political analyst Alberto Almeida, author of "The Vote of the Brazilians," said he expects Haddad's link with da Silva means Haddad will at least propel him into the top two in the first round of voting on Oct. 7, qualifying him for the runoff three weeks later.

Hoffman said that Haddad would drop even out of the vice presidential race if da Silva is allowed to run, leaving the running-mate slot to Manuela D' Avila, a young and telegenic state legislator from the Communist Party of Brazil, which has 10 seats in Congress out of 513.

"Lula asked us to make a formal request for Manuela to be candidate for vice president. Her candidacy had an important role to build this unity," the Workers' Party chairwoman said.

As part of the arrangement, D'Avila gave up her own presidential bid. The Workers' Party will have the Communist Party as its junior partner, along with a small centrist party and another fringe party on the far left.

Da Silva remains a towering political figure even from behind bars. The labor leader-turned-president oversaw a dramatic rise in Brazil's economy from 2003-2010, pulling millions from poverty and making the country a prominent player on the world stage.

But in the past few years, with da Silva out of office, the political mood has darkened as the economy has slumped and a far-reaching corruption investigation has ensnared hundreds of politicians and businessmen — including da Silva.

While that dented da Silva's popularity somewhat, many backers believe his conviction was unfair and politically motivated.

Haddad said the campaign will be based "on the unwavering defense of Lula, the biggest political leader of Brazil."

"Once more we are united around him. We are going to the fifth presidential victory in a row," he said during the announcement. Haddad was responsible for crafting the Workers' Party platform for the election.

While the Workers' Party under da Silva and Rousseff has won the past four presidential elections, it has been out of power since Rousseff was impeached and removed in 2016.

She was replaced by Michel Temer of the Democratic Movement Party, who had been her vice president under a coalition deal. Rousseff accused Temer of plotting her demise, which he denies, though his party's legislators voted overwhelmingly to oust Rousseff.