Supporters of Brazil’s protest movement and the police in Rio de Janeiro spent much of Tuesday arguing online over which side was to blame for violence at a demonstration the night before, at the start of a papal visit.

While neither side was able to produce definitive proof of who instigated the clashes on Monday near the governor’s palace in Rio, shortly after Pope Francis left the area, an examination of video recorded by witnesses, protesters and the police did appear to show undercover officers — called infiltrators by the protesters and intelligence agents by the authorities — at work.

A central piece of evidence in the arguments presented by both sides was 40 seconds of video released by Rio’s military police that showed a man near the front line between the two sides lighting and then hurling a Molotov cocktail, which exploded with a loud bang near officers in riot gear.

Although the police provided the video to the newspaper O Globo, and issued an invitation to the public via Twitter to watch what the department described as images of the protester who started the confrontation by throwing a Molotov cocktail at officers, within hours the clip was mysteriously removed from YouTube.

Vejam vídeo com manifestante que iniciou confronto atirando Coquetel Molotov contra #PMs //t.co/YgPk80v3Z8 — PMERJ (@PMERJ) 22 Jul 13

Late Tuesday, the police uploaded a different video clip to YouTube that captured a loud bang at some stage in the clashes outside an Esso station on Rua Pinheiro Machado near the Guanabara Palace. But that video was recorded from so far behind police lines that it offered no view of the person who threw the explosive.

Asked to explain the disappearance of video promoted by the department online, a police spokeswoman, Vanessa Andrade, suggested in an e-mail to The Lede that the clip had been removed from YouTube by hackers acting in defense of the protesters.

Brazilian bloggers who support the protests advanced a very different argument: that the masked man caught on video throwing the improvised explosive was an undercover police officer who had acted as an agent provocateur to give the authorities an excuse to break up the demonstration by force. Attempting to prove this theory, one blogger produced an annotated YouTube clip that mixed the police video with another view of the same area recorded later on Monday.

According to the theory advanced in the annotated video, the bomb thrower pictured in the police video, wearing a T-shirt with a bulky design on the front, was identical to a man caught on video later, retreating behind police lines and pulling off his T-shirt, alongside a second man also suspected of being an undercover officer.

Other bloggers, including Lucio Amorim — a marketing consultant who captured stunning Vine video of street protests in Rio last month — pointed out that another video clip recorded by a witness to Monday’s demonstrations showed the same two men passing unmolested through a crowd of uniformed officers.

Looking closely at the two videos, there appears to be little doubt that the two men shown at the end of the annotated clip also appear in the other video (the action from about the 46-second mark of the first clip seems to exactly match what unfolds about 20 seconds into the second), and the men do seem to be treated by the uniformed officers much more like colleagues than protesters.

The red wall that appears in the background of this video is the outside of Fluminense Football Club‘s historic Estadio Presidente Manoel Schwartz ground, where the pope also made an appearance on Monday night, just before the clashes began. Two New York Times journalists who were present when the clashes started said that the Molotov cocktail and the first volleys of tear gas came shortly after the pope left in his helicopter.

A third video clip, recorded by a witness armed with a better camera, appeared to offer even better evidence that the two men retreating from the protesters’ side were most likely undercover officers.

In the third clip, a close view from a reverse angle, the two men were briefly stopped by a uniformed officer who seemed to take them for protesters before one of them pulled out some form of identification and said, “It’s the police, dude.”

Ms. Andrade, the police spokeswoman, said the police force in Rio “has never denied that its intelligence has agents accompanying the demonstrations with the goal of obtaining information and predicting movements. This information is important for the decisions of our commanders.” She insisted, however: “These intelligence agents only work with observation. To imagine that a police officer would throw a Molotov cocktail at his professional colleagues, putting their lives at risk, is something that surpasses the limits of good sense and reveals a sordid conspiracy used to justify the criminal violence of these vandals.”

The police in Rio are of course far from alone in sending undercover officers to infiltrate protest movements. The New York Police Department has done so for years, as my colleague Jim Dwyer reported eight years ago.

Although the video evidence strongly suggests that those two men in Rio de Janeiro were undercover officers, there appears to be no proof that either of them was the bomb thrower. A close look at still frames of the original police video next to frames from the two other clips seems to show that while the man who hurled the Molotov cocktail was wearing a black T-shirt with a white design on the front, the man who retreated through the crowd of officers later wore a black T-shirt with a red design.

Photo

Photo

Photo

Although the other man suspected of being an undercover officer is bare-chested in these three clips, he appears to have been wearing a black T-shirt with a white pattern on its side, rather than the front, in more video of the clashes posted on Facebook by supporters of the protest movement.

That Facebook video, recorded as the police chased and ultimately captured one protester, seems to show the same undercover officer taking part in the arrest before pulling off his T-shirt and using it to cover his face as witnesses started to take his picture.

The blogger Lucio Amorim later shared a photograph on Facebook that appeared to show the same man pulling off his T-shirt just after the arrest.

Photo

Part of that same scene, the arrest of the protester after he ran from the officers and was knocked down with a shot from a stun gun, was also captured in video recorded by another witness from a bridge above the road.

A blogger named Felipe Buarque released perhaps the most useful overview of the clashes, a 12-minute video that captured everything from the first loud bang outside the Esso station to the dramatic arrest of the protester near the bridge. Protesters eagerly pointed to Mr. Buarque’s video, calling it evidence that the man who was detained by the police was not the bomb thrower.

The man in that video, whose arrest was also recorded by TV Globo, was identified by the police as Bruno Ferreira. Ms. Andrade, the police spokeswoman, told The Lede that Mr. Ferreira was “accused of having thrown the Molotov cocktail that left two officers with burns on their bodies.” Mr. Ferreira, however, was not wearing a black T-shirt with a white design on it, but a green jacket with a zipper. He was “released by the justice system on Tuesday night for lack of material evidence,” Ms. Andrade said.

Another video of his arrest shot from the street showed even more clearly that he was not wearing a black T-shirt and offered a glimpse of the man in civilian clothes quickly pulling off his shirt.

An image of Mr. Ferreira standing on the metal barricade between protesters and the police, apparently taken before the clashes, was shared online by his supporters as evidence that he was not wearing a black T-shirt at any stage.

Photo

Perhaps sensitive to how badly their reputation can be damaged by video evidence of what takes place at protests, the police took aggressive steps Monday night to limit the number of cameras at future demonstrations by bashing the head of at least one world-renowned news photographer, and arresting two members of the activist media collective known as Mídia Ninja.

As our colleagues Simon Romero and William Neuman reported last month, Ninja, “a Portuguese acronym for Independent Journalism and Action Narratives, has been circulating through the streets with smartphones, cameras and a generator held in a supermarket cart — a makeshift, roving production studio.”

On Monday night, the Brazil-based journalist Dom Phillips reported, the police detained Filipe Peçanha, a Ninja cameraman who goes by the nickname Carioca, as he was streaming live video of the protest.

Inevitably, video of his arrest was also captured from another angle on another camera. (In both clips, a man standing next to the citizen journalist, wearing a light blue shirt and talking on a phone, looked to be one of those identified by protesters as potential infiltrators.)

In a statement to The Lede, the police spokeswoman Ms. Andrade said, “The goal of detaining people on Monday night was to identify who had incited the disorder.” The police Twitter feed seemed to confirm that the authorities make no difference between activists documenting protests and vandals inspiring disorder: “Two protesters who transmitted the protests live were arrested for inciting violence.”

Foram presos por incitar violência dois manifestantes que transmitiam ao vivo as manifestações — PMERJ (@PMERJ) 22 Jul 13

Another Twitter update warned: “Whoever posts multimedia material on the Internet that encourages violence and vandalism is criminal.”

Quem posta material multimídia na Internet incentivando a violência e o #vandalismo é criminoso. — PMERJ (@PMERJ) 22 Jul 13

Video of Mr. Peçanha’s subsequent release showed protesters adapting soccer chants in celebration.

In an odd twist, hours after police officers at the demonstration battered the Agence France-Presse photographer Yasuyoshi Chiba on the head, the Rio de Janeiro police Twitter feed offered one of his photographs as proof that it was the officers who were the real victims of Monday’s violence.