Newly released footage from local Pennsylvania police reveals a clearer picture of the moments surrounding the attempted assassination of Donald Trump in July.

In one body-camera video, a local officer tells colleagues he told the US Secret Service ahead of time to secure the building the gunman used.

Another shows the moment an officer is hoisted on to a rooftop and lays eyes on the gunman, seconds before he opens fire at the Trump rally.

Trump was nicked by a bullet in the shooting, one person was killed and two others badly injured.

The body and dashboard footage was released on Thursday to US media outlets by the Butler Township Police Department.

They capture moments of frustration, confusion and miscommunication in the moments before and after the assassination attempt.

In one, a local officer said he had asked the Secret Service to man the building where the gunman had fired from, days before the rally.

“I told them they need to post guys over there,” he said, according to one video obtained by the Wall Street Journal.

“I told them that [on] Tuesday.”

The open-air rally took place on Saturday 13 July.

The officer appears angry as he tells his colleagues that he asked the Secret Service to secure the building.

“I talked to the Secret Service guys, they were like, ‘Yeah, no problem, we’re going to post guys over here,’” the officer says.

Thomas Matthew Crooks, 20, was shot and killed by the Secret Service counter-sniper team after he fired eight bullets in Trump’s direction from a rooftop just outside the rally’s security perimeter.

The would-be assassin was on a building in what police have described as a “secondary ring”, which was patrolled not by the Secret Service but by local and state officers.

Trump, who was on stage addressing supporters, was wounded in the ear before he ducked and Secret Service agents pulled him off stage.

In another video, a Butler County police officer is seen being hoisted up by a colleague on to the rooftop where he spots Crooks.

He quickly drops down when he sees the gunman is armed.

He is then seen running to the other side of the building and to his police car to retrieve a rifle.

Around 40 seconds after the officer first lays eyes on the gunman, Crooks fires at Trump.

The officer shouts to his colleague: “He’s straight up … Who’s got eyes on him?”

The video then shows police officers trying to access the roof.

“He’s got glasses, long hair,” the officer who saw Crooks tells them, adding he has a book bag and an AR-style rifle.

After getting on the roof, the officers see Crooks’ body.

The first police officer is then heard saying: “I popped my head up there like an idiot by myself,” adding that he “started calling out” that a gunman was on the roof.

“Were you on the same frequency?” he is heard asking, referring to the police radio.

In other footage, one officer reportedly appears confused as to why the rooftop was unmanned.

“I thought it was you! I thought you guys were on the roof!” He then swears in frustration and asked: “Why are we not on the roof?”

The Secret Service had posted three counter-snipers inside one of the adjacent buildings.

One of them had spotted Crooks earlier in the day following reports among the law enforcement on site of a suspicious person at the rally.

The Secret Service sniper then took a photo of Crooks before leaving his post to search for the suspect.

BBC News has not seen all the videos. Their contents were reported on by multiple US news outlet.

In a statement on Thursday, Secret Service spokesman Anthony Guglielmi said the agency was reviewing the footage.

“The US Secret Service appreciates our local law enforcement partners, who acted courageously as they worked to locate the shooter that day,” he said.

“The attempted assassination of former President Donald Trump was a US Secret Service failure, and we are reviewing and updating our protective policies and procedures in order to ensure a tragedy like this never occurs again.”

The FBI is also investigating the incident, as is a bipartisan House panel made up of 13 lawmakers.