Police in Tampa, Florida, have arrested a man suspected of killing two people in gun violence that sparked chaos on Sunday around a clutch of bars and clubs as people celebrated Halloween, authorities said.

Sixteen people were injured, all but one by gunshot, police said.

Tyrell Stephen Phillips, 22, was charged with second-degree murder in the shooting deaths of a 14-year-old boy and a 20-year-old man following a pre-dawn clash between two groups in the historic Tampa neighborhood of Ybor City, police said.

The altercation unfolded as hundreds of people filled the streets as night spots closed after an evening of Halloween-themed celebrations, then scrambled for cover at the sound of gunfire.

Videos on the social media platform X, formerly known as Twitter, showed pandemonium as people ran through the dark while at least a dozen shots rang out. In some of the footage, police officers were seen hurrying to help people in costumes bleeding on sidewalks.

Two people were killed and 16 were taken to hospital with injuries, 15 of them with gunshot wounds, police said in a statement.

Many of the injured, who ranged in age from 18 to 27, were treated and released, but five remained in hospital, police said.

Tampa Police Chief Lee Bercaw said witness tips to investigators played key role in helping police identify and arrest the suspected gunman. It was not clear if any other suspects were being sought.