Bolsonaro, a far-right firebrand who modeled himself on former U.S. President Donald Trump, surrendered his passport to police on last Thursday and four of his ex-aides have been arrested. Search warrants were served against four of his former ministers, three of them retired army generals.

That, analysts say, has dealt a serious blow to Bolsonaro's right-wing Liberal Party (PL), the largest opposition party. PL President Valdemar Costa Neto was also arrested on Thursday on an unrelated gun charge and set free provisionally on Saturday.

"The Bolsonaro opposition has been badly hurt by this," said Andre Cesar, analyst at Hold Assessoria Legislativa, a public policy consultancy. "The PL will lose political muscle and have to rethink plans to triple its mayors in the October elections."

Brazilian police accused Bolsonaro of editing a decree to overturn the result of the 2022 election that he lost to Lula, pressuring military chiefs to join a coup attempt, and plotting to jail a Supreme Court justice.

PL President Costa Neto has been counting on Bolsonaro's popularity with core supporters to bolster turnout for his party in October, when voters will elect mayors and councils in 5,568 municipal districts across Brazil.

However, Bolsonaro's alleged involvement in a coup conspiracy could cool support from moderate center-right Brazilians, who were not fans of Bolsonaro but voted for him to oppose Lula, according polling firm Quaest.

CRITICAL SOCIAL MEDIA POSTS

A social media survey conducted on Friday by Quaest showed 58% of the postings were critical of Bolsonaro, while 42% were favorable, indicating that he still has considerable support despite allegations of planning a coup, though less than the 49.1% who voted for him against 50.9% for Lula in 2022.

"There will be a huge drain on the PL that will benefit the Workers Party," said a former PL lawmaker who left the party last year and asked to remain anonymous.

The PL did not answer a request for comment. But a PL leader in Congress, Jose Medeiros, said the investigation was political persecution aimed at undermining Bolsonaro and the party to stop a right-wing comeback in the 2026 presidential race.

Even before Thursday's operation, Lula was already enjoying warming ties with some of Bolsonaro's former allies.

Sao Paulo Governor Tarcisio de Freitas, who was Bolsonaro's infrastructure minister and a rising conservative leader, has been politically pragmatic and recently met with Lula for a much publicized handshake.

Minas Gerais Governor Romeu Zema, a fellow rising star on Brazil's right, on Thursday said he "had learned to work with people who I think differently to," in reference to Lula and his leftist allies.

The big losers from the fallout of the alleged coup plot will be those closest to Bolsonaro ideologically, while the moderates court centrist voters who decide elections in Brazil, said Lucas de Aragao, at political risk consultancy Arko Advice.

"Moderate right-wingers face criticism for not supporting Bolsonaro enough, but they know they will get the Bolsonarista vote in a polarized left-right election," he said.

(Reporting by Anthony Boadle and Lisandra Paraguassu in Brasilia; Editing by Sharon Singleton)

By Anthony Boadle