RIO DE JANEIRO — He shouted. He swore. He pointed a finger at the camera. His voice wavered and cracked. This was Brazilian President Jair Bolsonaro indignant, airing grievances, vowing retribution.

“Why do they want to destroy me?” he asked during the live stream at 4 a.m. Wednesday from Saudi Arabia. “I shouldn’t lose it,” he said at another point, a tear glistening on his cheek. “I’m the president of the republic.”

A prominent media outlet here had just connected him to two men accused of killing a leftist politician here. But rather than defuse the explosive claims, Bolsonaro’s emotional and profane response appeared to draw greater attention to them on Wednesday, as people in and out of Latin America’s largest country openly questioned the president’s mental stability.

“He tried to put the flames out with gasoline,” said Alexandre Bandeira, a political strategist in Brasilia. “He had blood in his eyes … almost as if he were calling for a duel.”

Prosecutors later cast doubt on the report by Globo, saying its source had lied, or was confused. But Bolsonaro’s widely viewed video had left its mark. In this deeply polarized country, it was seen either as proof of Bolsonaro’s willingness to buck norms and speak forthrightly, or as a portrait of an unhinged man with dangerously autocratic instincts, ready to make good on his threat to take away Globo’s broadcasting license.

“This is a moment of extreme tension in the government,” said Lucas de Aragão, director of a political risk company in Brasilia. “They go hard and they go aggressive, and those that like him like this attitude, and those who dislike him think he is losing his mind.”

Bolsonaro’s emotional response threatened to further isolate him during a vulnerable time in his presidency.

The country has lurched from one environmental disaster to another. He’s openly feuding with the president-elect of Argentina, one of Brazil’s most important trading partners. Bolsonaro was assailed this week for posting — then quickly deleting — a video that showed him as lion being attacked by a pack of hyenas representing his critics in the media and government, including Brazil’s Supreme Court.

Then came Tuesday night’s report in Globo.

For months, Brazil has wrestled with questions of who ordered the killing last year of Rio City Councilwoman Marielle Franco. The rising star who advocated for the city’s Afro-Brazilians and poor was shot to death in her car.

In March, authorities charged two former police officers with her killing: Ronnie Lessa, 48, a retired officer who allegedly fired the shots that killed Franco; and Élcio Vieira de Queiroz, 46, who allegedly drove Lessa to the scene of the crime.

With the arrests, questions began circulating about the suspects’ connections to the president.

Bolsonaro denied knowing either man personally. But before his election last year, he and Lessa lived in the same upscale condominium in Rio de Janeiro, and their children had once dated, according to police reports. Scandal erupted when a photo of Bolsonaro and de Queiroz emerged on social media, showing the two men in a friendly embrace.

Police had discarded connections between the president and the suspects. But the new allegations Tuesday dragged Bolsonaro yet again into the infamous killing.

A doorman at Bolsonaro’s gated community told the television news program Jornal Nacional that de Queiroz arrived on March 14, 2018, and identified himself as a visitor to Bolsonaro’s residence. When the doorman called Bolsonaro’s home to confirm, he said, a man he identified as “Mr. Jair” told him to allow the visitor through.

The doorman said he kept watching de Queiroz’s car on security cameras and saw the vehicle was heading not to Bolsonaro’s home but to Lessa’s. So he called the apartment back. He said “Mr. Jair” told him he knew where de Quieroz was going and to let him continue, the news program reported.

Bolsonaro was in Brasilia that day for two plenary votes. That evening, as Franco was in a car in Rio, two other vehicles pulled up, and someone opened fire on the councilwoman. Nine police-issue bullets were lodged in her body; she died almost instantly.

On Wednesday afternoon, the office of Rio’s public prosecutor office said the doorman’s testimony did not match the evidence it had uncovered in its investigation.

Call logs and recordings from the gatehouse on the day of the murder indicate that Lessa, not Bolsonaro authorized Queiroz to enter the gated community, authorities said.

“Any information different from that is wrong and does not match the technical proof,” prosecutor Simone Sibilio told journalists. “Whether the doorman got confused or lied, that will be investigated.”

Earlier Wednesday, Bolsonaro’s son, Carlos, tweeted a video of the alleged recordings. They indicated that Queiroz asked the doorman to go to Lessa’s house, not Bolsonaro’s.

Franco, who was 38, was elected in 2016 as the only black woman on Rio’s 51-person city council. A left-wing lesbian activist and champion for the rights of Afro-Brazilians, she emerged as a powerful critic of Brazil’s security forces — and a voice for the civilians who had been killed in a crackdown on poor neighborhoods, much like the one she was raised in.

After her death, her name became a worldwide symbol of the fight against racial oppression. Crowds around the globe protested her killing with the chant “Marielle Presente” — Marielle Is Here.

As Bolsonaro ascended to the presidency, he remained nearly silent on Franco and her death. But his reticence ended Wednesday morning.

At the beginning of his apparently unscripted defense, he appeared composed.

“I had no reason to kill anyone in Rio de Janeiro,” he declared. “This will not stick.”

“Why this scheming?” he demanded. “Let me govern Brazil! And you, TV Globo, you make my life hell, damn it.”

Supporters of Franco called for an inquiry.

“We demand immediate clarifications,” said Juliano Medeiros, president of Franco’s Socialism and Liberty Party. “Brazil cannot live with any doubt about the link between the President of the Republic and a murder. We demand answers.”

Bolsonaro’s relationship with Rio state governor Wilson Witzel — once a close ally, but now a bitter political rival — appeared broken.

In his video, and in comments afterward, Bolsonaro accused Witzel of leaking details of the police investigation for political gain.

“In my understanding, Mr. Witzel was leading the process … to try to incriminate me or at least stain my name with this false accusation.”

Witzel denied those charges.

“I was a magistrate for 17 years and always upheld constitutional principles,” he said. “I’ve never leaked any type of information, neither as a judge, nor as a governor.”