President Trump on Monday presented the nation's award highest award for public safety to six Dayton police officers who responded to last month’s mass shooting in the Ohio city that left nine people dead and more than two dozen injured.

Appearing alongside Attorney General William Barr, the president presented the Public Safety Officer Medal of Valor to the officers who first responded to the Aug. 4 mass shooting in a crowded downtown Dayton entertainment district. The officers confronted the shooter within 30 seconds, a swift response credited with preventing more deaths.

“There are few people who could have done, and would have done, what these police officers did,” Trump said from the White House’s East Room. “To each of you, we are in awe of your swift response, sterling professionalism, and rock-solid nerves of steel.”

OHIO SHOOTING VICTIMS INCLUDE GUNMAN'S SISTER, MOTHER OF TWO WHO WAS A NURSING STUDENT

The Dayton police officers who received the Medal of Valor were Sgt. William Knight and officers Brian Rolfes, Jeremy Campbell, Vincent Carter, Ryan Nabel and David Denlinger.

According to authorities, 24-year-old Connor Betts shot 26 people in the span of 32 seconds before Knight returned fire after hearing the gunshots from his police cruiser. The five other officers rushed toward the gunman and prevented him from continuing his rampage.

“These officers were the thin blue line between life and death,” Barr said. “We thank God on that horrible night in Dayton we had men with these qualities.”

The president also honored the heroism of five civilians with heroic commendations for having helped others as a gunman opened fire at a Walmart in El Paso, Texas, killing 22 people and wounding others.

Calling the shooter “soulless and bigoted” and the attack “racist,” Trump went on to praise the civilians who put their lives in danger to help save others when the gunman began his shooting inside the Walmart.

EL PASO SHOOTING SUSPECT'S MOM SAYS SHE CALLED POLICE WITH CONCERN ABOUT RIFLE SON OWNED: REPORT

“In the darkest moments of despair, God called them into action and they put love of their neighbor above their life,” Trump said. “We are forever inspired by their goodness and the grace of their deeds.”

The commendations were granted to Robert Evans, who notified store employees of the shooting; Gilbert Serna, who guided customers to the back entrance during the shooting and hid them in shipping containers; Marisela Luna, who guided customers near the store’s lobby; Angelica Silva, who helped save the lives of wounded victims; and Chris Grant, who was wounded when he threw soda bottles at the shooter to district him.

“To the families of the heroes, you understand the difference your loved ones made in lives,” Trump said. “We thank you from bottom of our hearts.”

The pair of shootings in August – followed by another one in Texas weeks later – has sparked renewed national discussion of gun control.

CLICK HERE FOR THE FOX NEWS APP

In the days after the shootings, which happened within 24 hours of each other, Trump signaled he was open to proposals for new background checks, saying "there is a great appetite" for such measures. But within days, following a call with NRA president Wayne LaPierre, Trump abruptly changed his tone and said background checks would not have helped.

Trump's comments were reminiscent of his wavering last year, when he vowed to support background checks in the wake of a school shooting in Parkland, Florida, only to relent after receiving pressure from the NRA.

This time there seems to be more sustained momentum to produce some sort of measure after Trump asked aides to pull together a comprehensive list of ideas. White House officials have been meeting with lawmakers and congressional staff as they try to formulate a plan Trump can support without risking fallout from his political base.

The Associated Press contributed to this report.