(Bloomberg) -- Former President Jair Bolsonaro asked a computer programmer if it was possible to infiltrate Brazil’s electronic voting system and expose vulnerabilities, and promised to pardon him if he was caught, the hacker testified on Thursday. 

Bolsonaro also requested that the hacker, Walter Delgatti Neto, take responsibility for wiretapping the top court justice who is investigating the right-wing former leader, according to his testimony.

Delgatti Neto appeared before the congressional committee investigating riots that erupted on Jan. 8, when Bolsonaro supporters stormed major government buildings in Brasilia, the capital, in an attempt to overturn his defeat to President Luiz Inacio Lula da Silva in last October’s election. 

Bolsonaro spread conspiracies throughout the contest and made baseless assertions that Brazil’s electronic voting system was vulnerable to fraud. But Delgatti Neto’s allegations are among the most direct that Bolsonaro went beyond false claims to play an active role in efforts to undermine Brazil’s election system before the contest took place.

“He told me that I would be saving Brazil, that it was the freedom of the people at risk, that I needed to help him ensure the honesty of the elections,” Delgatti Neto told the committee.

Bolsonaro spokesman Fabio Wajngarten denied the assertions on social media, saying that Delgatti Neto “lies, lies, lies.” Bolsonaro’s attorneys said in a separate statement that Delgatti Neto presented false information and that they planned to take legal action.

But the claims will potentially add to a mountain of legal troubles facing Bolsonaro, whom Brazil’s chief electoral authority has already banned from seeking public office for eight years. The testimony came less than a week after Federal Police asked courts to unseal banking and tax records in an investigation into whether Bolsonaro tried to sell gifts he received as president.

Brazilian authorities have also detained Bolsonaro allies in other investigations that, together with the congressional probe, have sought evidence into whether the former president and officials from his government were aware of — or potentially involved in — attempts to overturn the election.

“After Walter Delgatti’s testimony, we don’t need anything else to make it clear who was behind the coup in this country,” congresswoman Jandira Feghali, a Lula ally, said during the hearing. “The [former] President of the Republic wants to hire a hacker to fake an electronic ballot scam. It’s one crime after another.”

Read More: Bolsonaro to Be Banned From Public Office in Brazil for Eight Years

During a meeting at the presidential residence, Bolsonaro asked Delgatti Neto if it would be possible to hack a single ballot during the country’s September independence day celebrations, he told lawmakers. Delgatti Neto testified that Bolsonaro said he would grant him a presidential pardon if he were caught. 

Delgatti Neto also said Bolsonaro told him to go to the Ministry of Defense, which was holding an investigation into election security, to detail technical information about how he could hack the ballot. 

Infiltrating the system to alter a single ballot could have helped feed Bolsonaro’s efforts to cast doubt on Brazil’s voting system ahead of the closely-fought election.

In a subsequent phone call, Bolsonaro told Delgatti Neto that he had managed to wiretap Justice Alexandre de Moraes — the head of Brazil’s top electoral court — and needed the hacker to take responsibility for the action, Delgatti Neto testified. 

He said Bolsonaro told him that the illegal wiretap was made by “agents from another country,” and that if he were caught, the former president said he “will have the judge arrested.”

Delgatti Neto did not provide direct evidence to back his claims, but listed names of people he said witnessed the requests. 

Bolsonaro’s attorneys countered those claims in their statement, saying that after Delgatti Neto informed him of the “alleged vulnerability of the electoral system,” Bolsonaro ordered the Defense Ministry to investigate the allegations. They also said that after the initial meeting at the presidential residence, Bolsonaro was “never again” in the presence of Delgatti Neto, and did not maintain “any type of direct or indirect contact with him.”

Delgatti Neto did not answer questions from Bolsonaro’s congressional allies during an afternoon committee session, remaining silent throughout. Before the hearing ended, the committee requested that the hacker be placed in Brazil’s witness protection program. 

Delgatti Neto will testify to Federal Police for a second time on Friday morning.

Brazil’s Supreme Court, of which Moraes is a member, declined to comment. The Ministry of Defense has not yet responded to Delgatti Neto’s claims.

(Updates with additional details from hearing and statement from Bolsonaro’s attorneys)

©2023 Bloomberg L.P.