Police have confirmed that nine people have been killed and at least 26 injured in a mass shooting in Dayton, Ohio. 

The news comes hours after a mass shooting in El Paso, Texas, left 20 people dead. 

First reports came in at about 01:00 local time (05:00 GMT) of a shooting outside a bar in the Oregon district of the city.

Officers confirmed that the shooter was killed at the scene.  

Mayor Nan Whaley said the injured were in several hospitals throughout the city, but warned that hundreds could have died had the police not responded so quickly.

She told reporters she was "amazed" by the quick response of the officers, but also stressed it would be a "very, very difficult time" for families of victims.

"As a mayor, this is a day that we all dread happening," she said. "What's very sad is I've got messages from mayors across the country - it's sad that we've all gone through it."

READ MORE: El Paso shooting: 20 dead and more than two dozen injured 

Reacting to the two shootings online, President Donald Trump tweeted: "God bless the people of El Paso Texas. God bless the people of Dayton, Ohio."

He added that the FBI, local and state law enforcement were working together to investigate both attacks.

A tweet from the Dayton police department said: "We had officers in the immediate vicinity when this shooting began and were able to respond and put an end to it quickly,"  

Assistant Police Chief Matt Carper told reporters that officers on patrol managed to take down the shooter.

"Our people are very well trained for a situation like this," he said, adding it was "very fortunate that the officers were in close proximity".

Nothing is yet known about him, but Officer Carper said they were "anxious to discover" a motivation.

Footage posted on social media showed people running as dozens of gunshots echoed through the streets.

It is thought the shooting took place outside Ned Peppers Bar on E 5th Street.

Jae Williams told the BBC he was at a nearby rap performance when they were told to evacuate.

"I was very shocked," he said. "We all evacuated quickly and safely. We were told to avoid the Oregon district."

"I got to my car, I could see cops, multiple ambulances."

Another eyewitness told Reuters they had been in a nearby nightclub, Newcom's, when the shooting happened.

"The screams, the cruisers, the chaos... the security guards and themselves were running around and telling people to get out and just how everybody was acting, you knew something was wrong," she said.

"And then when you came outside, as soon as you hit the front street, you've seen the bodies, you knew this was different. You knew it was something that you never thought of experiencing, never experienced, wouldn't want anyone to experience."