It only took a gunman about 30 seconds to kill nine people and injure 27 others before police took him down early Sunday morning in Dayton, Ohio.

Police encountered and took down the shooter as he approached a crowded bar in Dayton's Oregon District, where people had fled the shooting that began only seconds earlier, surveillance footage shows.

In this video, the shooter is seen running toward the open doors of a bar, he falls feet from the entrance:

"While this is a terribly sad day for our city, I'm amazed by the quick response of the Dayton Police that saved literally hundreds of lives," Dayton Mayor Nan Whaley said.

The shooter, 24-year-old Connor Betts of Bellbrook, Ohio, was shot and killed by police. His sister, Megan Betts, was among those he killed. He started shooting around 1 a.m. Sunday at crowds gathered outside night clubs in Dayton's Oregon District.

Whaley said Sunday's shooter was armed with .223-caliber "assault-style" rifle and had body armor and extra magazines. She called the shooting "a senseless act of violence."

This video below shows people fleeing as you hear shots ring out in the street:

"These things are so random," she said. "What really goes through my mind is this is completely preventable."

Authorities said the shooting began near a pub called Blind Bob's and extended to Ned Peppers tavern.

Dayton Police Chief Richard Biehl said officers who already were in the area responded immediately, located the gunman and killed him within about 30 seconds.

This video shows the response of the officers:

Biehl said Betts, who had more than one gun with him, purchased the .223 caliber rifle from a local firearms dealer, who in turn had ordered it online from Texas. He said the weapon was purchased legally.

'Do something!' The mourning of Dayton shout down Ohio Gov. Mike DeWine in call for action

Nine dead, 27 injured:What we know about the victims of the Dayton shooting

Day 2:Dayton police say 'not close enough at all' to determine a motive

Who is Connor Betts:What we know about the gunman

'When is enough enough?':Gunman kills 9, injures 27 in Dayton mass shooting