BRASILIA (Reuters) - Brazil’s Workers Party registered jailed former President Luiz Inacio Lula da Silva on Wednesday as its presidential candidate while he sat in prison serving a 12-year graft sentence expected to block his candidacy.

Slideshow ( 12 images )

About 10,000 supporters marched to the country’s top electoral court in the capital Brasilia chanting “Free Lula” and “Lula for President” as they accompanied senior party members registering his candidacy hours before the deadline.

Marchers wore Lula masks and carried signs calling him a political prisoner, a common complaint from his supporters.

Lula, who has denied any wrongdoing, was convicted of accepting bribes and has been accused in other ongoing cases of orchestrating a kickback scheme while in office.

The leftist former union leader has been in jail since April but leads electoral polls that include his name. While he was named earlier this month as his party’s candidate, Lula is expected to be barred from running by Brazil’s electoral court (TSE).

The Workers Party is expected to use an array of appeals to delay any final ruling on Lula’s registration for weeks.

The Workers Party registered former Sao Paulo Mayor Fernando Haddad as Lula’s running mate. Haddad would top the ticket if Lula was barred, party sources said.

“People thought Lula would not survive in the polls and the opposite is the case. He is still the front-runner in all scenarios and would win outright in some of them,” Haddad told reporters after registering the party ticket. “If the people want to vote for him they should have the right to do so.”

The office of the federal prosecutor-general immediately filed a request at the TSE to invalidate Lula’s candidacy because his conviction has been upheld by an appeals court, which in Brazilian law makes Lula ineligible for public office.

Lula governed Brazil for two terms from 2003 to 2010 and left office with a record approval rating of 87 percent due to a booming economy and social programs that lifted millions of Brazilians from poverty.

That popularity has been hurt by corruption scandals involving his party, which lost power in 2016 when his hand-picked successor, Dilma Rousseff, was impeached for breaking budget rules.

Still, polls show about one-third of Brazilians would vote for Lula, almost double his nearest rival, far-right lawmaker Jair Bolsonaro. Many supporters are expected to vote for whomever replaces Lula on the Workers Party ticket.

With the charismatic Lula behind bars, the Workers Party has been absent from the initial presidential debates. Now that Haddad is registered as his running mate, however, he will begin campaigning across the country next week, party leaders said.

Analysts said Haddad could be competitive if he attracted the Lula vote, but he could be at a serious disadvantage because the Workers Party, known as the PT for its acronym in Portuguese, has waited so long to thrust him into the spotlight.

“The PT did not listen to cooler heads in the party that wanted Haddad nominated in June,” said David Fleischer, politics professor emeritus at the University of Brasilia. “They are trying to use Lula’s popularity and image as a martyr to the max to fortify the party.”