The chief justice of a Brazilian appeals court blocked another judge’s efforts to release imprisoned former president Luiz Inacio Lula da Silva on Sunday, in a legal battle over the country’s most popular politician ahead of an October election.

Polls suggest the leftist icon, who is in prison for bribery, could win a third term if he entered the race, but Brazilian electoral law forbids politicians from running for office within eight years of being found guilty of a crime.

Still, an electoral court may not issue a final ruling barring Lula from the presidential race until next month. Sunday’s legal back-and-forth may encourage supporters holding out hope that he can still return to unite Brazil’s left.

Appeals court Judge Rogerio Favreto, who served in the Justice Ministry under Lula and was appointed by his handpicked successor, said in his order that for now the former president should have the same conditions to campaign as other candidates.

However, Moro said the chief justice on the appeals court instructed him not to free Lula immediately. Soon thereafter, another appellate judge responsible for the former president’s case issued a decision that he should not be released.

The former president is serving time for taking bribes from an engineering firm in return for help landing contracts with a state firm. He faces another six trials for other corruption allegations. Lula has denied all wrongdoing.

In polling scenarios including Lula in the race, he wins more than twice the support of his nearest challenger. When he is left out, a third of respondents say they would spoil their ballots or leave them blank.

That has made it harder for leftist candidates such as former Ceara Governor Ciro Gomes to build momentum in a highly fragmented field.

Support for former Sao Paulo Mayor Fernando Haddad would more than triple with Lula’s backing, lifting him to second in the race, according to a survey last month.