Shortly after Thomas Matthew Crooks opened fire at a rally for former president Donald Trump, a local police officer in Pennsylvania complained to a colleague that he had warned the Secret Service in advance about the need to secure the area the gunman used, according to police body-cam video released Thursday.

“I f***ing told them they needed to post guys f***ing over there. I told them that f***ing Tuesday,” the officer can be heard telling a colleague.

The video, one of 12 provided to The Washington Post in response to a records request, shows the confusion and frustration among law enforcement in the aftermath of the shooting, underscoring a key question at the core of multiple investigations into the Secret Service’s most serious security failure in decades: Why didn’t anyone secure the roof of a building so close to the rally site?

“Why weren’t we on the roof?” an officer in one of the videos asks a colleague. Another officer responds that “the Secret Service guys, they were like, ‘yeah, no problem, we’re gonna post guys over here.’”

A spokesman for the Secret Service did not immediately respond to a request for comment.

The footage is from body cameras worn by police officers for Butler Township, one of several law enforcement agencies asked to help the Secret Service secure the July 13 rally. Officials have said Crooks fired eight shots that day, wounding Trump, killing one rallygoer and critically injuring two others.

The videos also show a moment that has become a defining illustration of the communication gaps between local and federal law enforcement that day.

They capture an officer being hoisted onto the roof of the Agr International building, where he glimpsed Crooks with a gun a half-minute before he opened fire. Seconds after peeking over the edge of the roof, the officer drops down and retreats to the building’s parking lot, the video shows.

The officer radioed to a local command post that Crooks was armed with a rifle, but that message never made it to the Secret Service command center or agency’s personnel closest to Trump, The Post previously reported.

Local officials have previously said that the officer dropped down from the roof because Crooks pointed his rifle at him and that the officer could not quickly access his gun because he was using his hands to hold himself up.

“F***in’ this close, bro,” the officer says to a colleague while taking cover in the parking lot, pinching his fingers in the air. “Dude, he turned around on me.”

Crooks is not visible in the rooftop video. But later, after Crooks was killed, the officer explains that he had alerted others on a police radio channel and asks his colleagues if they had access to that channel.

“That’s what I was calling out, bro,” the officer says while standing with other law enforcement officials on the roof next to Crooks’ body. “F***** on top of the roof. Are you all on the same frequency?”

On the day of the rally, local snipers were assigned to observe the crowd from two windows on the second story of the Agr International building, but no one was on the rooftop of the adjoining building that Crooks used as his perch.

In the immediate aftermath of the shooting, some officers appeared baffled by how that could have happened.

“I thought you guys were on the roof,” an officer says to another in one of the videos.

“No, we’re inside,” another responds.

“I’d say this is a f*** up,” an officer says in another video. “Someone f***ed up.”

“There wasn’t anyone on the roof,” a colleague answers. “The stage is right there.”

Later in the same video, one of the officers says that when he saw someone on the roof, “they probably should have yanked Trump right off the stage.”

“I called it,” he says, an apparent reference to a radio transmission. “It isn’t my fault.”

The videos, only some of which have audio, also capture local officers’ frantic search for Crooks in the minutes before the shooting. The Post did not identify Crooks in any of the videos.

Officers can be seen responding to the Agr International building, circling its perimeter and gesturing toward the roof. After the shooting, some express their frustration.

“I’m f***ing pissed,” an officer says in a recording after Crooks was killed. “We couldn’t find him.”