Dramatic footage shows the moment a gunman fired a barrage of bullets at Indiana police officers in an ambush-style attack last week, highlighting the risk faced by law enforcement officers, a group President Trump praised Tuesday as "among the bravest Americans to ever live."

The Evansville Police Department on Tuesday released surveillance and body camera footage from the May 11 shootout, which police say showed 51-year-old Barry Freeman firing at officers and their vehicles for nearly an hour. Police are still trying to figure out a motive for the attack.

Freeman killed his neighbor before riddling the neighborhood with bullets, police said.

Officers responding to reported gunfire saw Freeman standing in a driveway with a rifle when he opened fire on them, Evansville Police Sgt. Jason Cullum said at a news conference Tuesday.

"Somehow, we managed to get through this without any officers being injured," he said.

While no members of law enforcement were injured or killed in Friday's shooting in Indiana, at least 36 law enforcement officers across the U.S. have died while on duty since the start of 2018, with 24 of the deaths caused by gunfire.

Roughly 135 cops died in 2016, making it the deadliest year for police officers in at least five years, Fox News found. While there were fewer deaths in 2017, the numbers weren’t much better: A total of 129 officers died last year. And 46 of those were caused by gunfire.

The video of the Indiana attack was released the same day President Trump paid tribute to fallen law enforcement officers, saying those who wore the uniform "were among the bravest Americans to ever live."

"They made the ultimate sacrifice so that we could live in safety and in peace," the president said.

During the shooting rampage Friday, police said Freeman fired "dozens" of rounds from an AR-15 and shotgun, striking four law enforcement vehicles, four houses and two businesses in the area.

A neighbor, 56-year-old Jeffrey Kempf, was fatally shot after encountering Freeman. Cullum said that Freeman mistook his neighbor for a law enforcement officer and shot him after Kempf went to check on neighbors to make sure they were safe after hearing gunshots.

OFFICERS KILLED IN THE LINE OF DUTY IN 2018

Cullum said that Freeman did not shoot at civilian vehicles that were passing by, only taking aim at law enforcement officials.

"He was targeting patrol cars because he thought there were police officers inside them," he said.

Authorities later gave a tour of one of the police vehicles that was riddled with bullet holes and had several windows shot out. One of the police cruisers had 23 bullet holes, according to FOX59.

Surveillance video obtained from a neighbor's home shows Freeman taking cover behind a vehicle in an "ambush attempt," and going into the driveway several times to shoot at police responding to the scene. Freeman did not have a criminal history, only receiving a traffic violation in recent years, and may have been intoxicated during the rampage, according to Cullum.

SON OF FALLEN INDIANA PATROLMAN GREETED BY 70 OFFICERS IN FIRST DAY BACK AT SCHOOL

"We were told by his son while this event was unfolding that he had prior military experience," Cullum said.

The rampage came to an end after Detective Kyle Thiry, a seven-year department veteran, shot Freeman twice in the chest from 63 yards away in a "dimly lit neighborhood," according to Cullum.

"Officer Thiry is credited with ending Mr. Freeman's rampage that night," he said Tuesday. "That is a testament to the skill and the calmness that Officer Thiry displayed that night in bringing peace back to that neighborhood."

He said it was unclear what set off Freeman.

"This is one that makes no sense to anyone that's involved,” Cullum said.

Fox News' Madeline Farber contributed to this report.