The judges from the Supreme Electoral Court on Friday ruled six to one against the once highly popular leader who was leading in the polls for the upcoming elections, Efe news reported.
"There is no margin here for the electoral court to make any other evaluation but the one showing there is a conviction, and that conviction matters in the candidate's eligibility" to run, said Barroso.
The lone opposing voice during the steamy session Justice Edson Fachin disagreed with his fellow justices, citing a recent call by a United Nations human rights committee calling for Lula to be allowed to run while he further appeals his conviction.
His Workers' Party (PT in Portuguese) called the decision arbitrary and politically motivated, adding that it would appeal the electoral court's ruling.
"We have a clearer picture that Lula's candidacy is doomed", said David Fleischer, a politics professor at the University of Brasilia.
The candidate, who served two terms as Brazil'spresident from 2003-2011, widely known as Lula, is a founding member of Brazil's only socialist political party, Partidos dos Trabahlhadores, the Worker's Party, but he has been in jail after receiving a 12-year sentence for corruption and money laundering earlier this year.
Although he vehemently denied all accusations against him, dismissing them as a political plot to prevent him from standing for elections, he was found guilty in July 2017 and lost an appeal against the conviction in January 2018. Under Brazilian law, Lula was deemed unable to run for the presidency after his conviction was upheld on an initial appeal.
Brazil's Workers' Party (PT) later responded to the court's decision in a statement, saying it would "fight by all means" for Lula's candidacy. His closest contender is the far-right former general Jair Bolsonaro on 19 percent.
"There is a cut-off date in Brazilian law - September 17 - and the party will have that as a limit for the party to replace their candidate".
Lula reportedly chose Fernando Haddad, former mayor of São Paulo, to run for the PT should he be prevented from doing so.
Polls show tepid support for the vice presidential running mate Haddad's bid, but the party hopes Lula's popularity could boost the former mayor's hopes.
Supporters of the former Brazilian president Luiz Inácio Lula da Silva attend a rally in Curitiba, Brazil, on August 30.
The court could also rule on Friday on a request by the conservative Partido Novo to exclude Lula from the television and radio ads campaign.