Brazil’s Workers’ Party has replaced jailed former president Luiz Inacio Lula da Silva as its candidate for October’s general election, clarifying one of the biggest question marks hanging over the vote to lead Latin America’s largest nation.

The party confirmed the move after a meeting of its executive committee in the southern city Curitiba, where da Silva is jailed.

Fernando Haddad, a former Sao Paulo mayor, will lead the ticket and be joined by Manuela D’Avila, a member of Brazil’s Communist Party.

The move, while long expected, was an acknowledgement that the party could not get da Silva, who Brazilians universally call Lula, on the ballot despite numerous attempts in the courts.

G20 Summit Day One
Ex-president Lula da Silva is currently in custody (Geoff Caddick/PA)

“The struggle has just begun. Let’s go, Haddad! Haddad is Lula!” the Workers’ Party Twitter account said.

“He was a Lula minister, he is a Lula attorney and best of all: he is a friend of Lula’s.”

The political science professor turned education minister and later politician was meeting with da Silva after the decision, members of the left-leaning party said.

A press conference and formal announcement were expected later in the afternoon.

Da Silva is serving a 12-year sentence for trading favours with construction company Grupo OAS for the promise of a beachfront apartment.

Brazil Elections
Marina Silva is the presidential candidate for the Sustainability Network Party (Silvia Izquierdo/AP)

The former president, who governed between 2003 and 2010, has always denied wrongdoing, arguing this case and several others pending against him are meant to keep him off the ballot.

Lula led polls for more than a year, but his candidacy was recently barred by the country’s top electoral court.

Recent polls show Mr Haddad far behind, but the party hopes he will now rise with da Silva’s endorsement.

The current leader is far-right congressman Jair Bolsonaro, consistently over 20% in a race that puts several candidates at around 10%.

Mr Haddad was education minister under da Silva and his successor, Dilma Rousseff.

In 2012 he was elected mayor of Sao Paulo, the most populous city in South America, but failed to get re-elected four years later.

A Datafolha poll published on Monday shows Mr Haddad in fourth place, favoured by 9%.

AP Explains Assassinations and Video
Jair Bolsonaro is carried away after being stabbed during a campaign rally (Fernando Goncalves/AP)

That was a rise of five percentage points in just a few weeks, but still behind Mr Bolsonaro’s 24, left-leaning Ciro Gomes’ 13, centrist Marina Silva’s 11 and right-leaning Geraldo Alckmin’s 10%.

The poll had a margin of error of 2 percentage points.

All the 2,804 voters sampled were interviewed on Monday, days after da Silva’s candidacy was barred by the electoral court and Mr Bolsonaro was stabbed in an incident that might put him in hospital until election day.

If no candidate gets more than 50% on October 7, a runoff will be held on October 28.