(CNN) -- A 22-year-old man was in custody as a suspect in a shooting during a New Year's Eve fireworks show in Sacramento, California, where two people were fatally shot and three were wounded, police said Tuesday.
The suspect, whose name wasn't released, is being treated at a Sacramento hospital, police said.
The shooting occurred in Old Sacramento, where 40,000 people, including families with young children, had gathered for the 9 p.m. fireworks show, CNN affiliate KOVR reported. Witnesses reported hearing the shots and running for cover.
Police canceled the next fireworks show, which was scheduled for midnight.
The violence began with an argument inside a sports bar that escalated into a fight and culminated in a shootout between the suspect and an armed security guard, police said.
An employee tried to break up the fight, and the suspect fired several rounds toward the subjects he was fighting with, police said.
The two people fatally wounded were the employee, who was in his 20s, and a 35-year-old man, police said. They suffered multiple gunshot wounds and died at the scene, police said.
An armed security guard near a side door exchanged gunfire with the suspect, and both sustained wounds that were not life-threatening, police said.
Also wounded was a 30-year-old woman, whose injury was to her lower body and not life threatening, police said.
The armed suspect ran from the bar toward the crowded street but was caught by police, authorities said. The security guard was taken to a local hospital, police said.
Police recovered two guns at the scene.
Witnesses who spoke to KOVR said they saw a man being taken into custody.
"They had one person in an ambulance and one person in a cop car," a woman told the station.
"I saw the gun in the hand. He was just screaming and shooting," said another.
A helicopter flew over the crowds announcing the fireworks cancellation, and authorities responded with mounted police, squad cars and firetrucks to block off the crime scene, according to KOVR.
CNN's Tina Burnside contributed to this report.