Gleisi Hoffmann, the head of jailed ex-president Luiz Inacio Lula da Silva's Workers Party, holding masks of the former leader, whose appeal against disqualification in October elections has been rejected by the Supreme Court

A Brazilian Supreme Court judge on Thursday rejected an appeal by jailed former president Luiz Inacio Lula da Silva to overturn his ban on running in next month's elections.

Brazil's electoral court had disqualified Lula on the grounds that the country's clean-slate law prevents anyone who has lost an appeal against a conviction from running for office.

Lula was convicted on charges of accepting a seaside apartment as a bribe and then lost an initial appeal. On Wednesday, his lawyers filed an appeal against the disqualification to run in the elections, in which polls had shown he would be the front-runner.

The electoral court gave Lula's Workers' Party until September 12 to nominate a replacement and banned the 72-year-old from campaigning.

Lula's lawyers based their latest appeal on a decision by the UN Human Rights Council, which requested that the two-term ex-president be allowed to exercise his political rights as a candidate, despite being in jail. It said he should be allowed to run "until his appeals before the courts have been completed in fair judicial proceedings."

But Supreme Court Justice Luiz Edson Fachin, who is overseeing the massive corruption probe known as Car Wash, rejected the appeal.

At the same time, federal prosecutors asked the Supreme Court to open an investigation against sitting President Michel Temer on charges of corruption and money laundering.

Brazilian media said the request centered around charges that Temer -- a former vice president who took office after then-president Dilma Rousseff was impeached in 2016 -- allegedly received in 2014 a sum of 1.43 million reais (around $240,000) from the construction giant Odebrecht, the company at the center of the huge corruption probe.

The charges also allege that his political party received 10 million reais from Odebrecht for its 2014 election campaign, in which he ran as Rousseff's vice president.

Temer has already dodged two attempts to impeach him in the past year, and has the lowest popularity rating of any president in Brazilian history. Corruption has become a key theme in the presidential elections, the first round of which are scheduled to take place on October 7.

- Bolsonaro streaking clear -

With Lula ruled out, the latest polls from the Ibope Institute put right-wing candidate Jair Bolsonaro in a clear lead with 22 percent compared to 12 percent for environmentalist Marina Silva and center-left runner Ciro Gomes.

Bolsonaro had been trailing Lula in a distant second place with 18 percent compared to the leftist former president's 38.

Lula's running mate and likely replacement for the Workers' Party, Fernando Haddad, picked up just six percent in the poll while center-right candidate Geraldo Alckmin saw his share rise from seven to nine.

It's not all good news for Bolsonaro, a self-confessed fan of Brazil's 1964-85 military dictatorship and its use of torture.

The poll, organized for TV Globo and O Estado de Sao Paulo newspaper, predicted Bolsonaro would be soundly beaten by any of the other candidates in a second round of voting on October 28. Some 44 percent of respondents said they would never vote for him.