LOS ANGELES — A black man who was fatally shot by Los Angeles County Sheriff’s deputies kept holding a gun as he lay dying on the ground, authorities said Sunday in response to questions about why they continued to fire on him after he fell to the pavement.

A close-up from security footage showed 28-year-old Nicholas Robertson stretched out on the ground with a gun in his hand. He died at the scene Saturday morning in the south Los Angeles suburb of Lynwood.

Two deputies fired 33 bullets at the man after he refused to drop the gun and walked across a busy street to a filling station where a family member was pumping gas, homicide Capt. Steven Katz said.

“When he collapsed, his arms were underneath him, and the gun was still in his hand. There was never a time when the weapon was not in his possession,” Katz said.

Asked if the officers were white, Katz said no but would not elaborate.

Police confronted Robertson as they investigated 911 calls from witnesses who saw a man firing a gun into the air. Witnesses said he was walking down a residential street and then through a busy commercial area holding the weapon and acting strangely.

Witnesses told authorities that Robertson reportedly fired six to seven rounds and briefly went into a car wash and a pizza parlor before deputies arrived.

Deputies spotted the man in front of the gas station, where two women and three children were inside a car, and ordered him to drop the gun, but he refused and at one point pointed it in the deputies’ direction, Katz said.

Robertson may have been in a dispute at home with his spouse, but authorities have yet to verify that report, Katz said.

Video, apparently from a cellphone, appeared on several media sites. It appears to show deputies firing some two dozen bullets, including several rounds after Robertson falls and is crawling on the ground.

Robertson’s wife declined to speak with The Associated Press, providing only a photo of their children. Earlier, she told the Los Angeles Times that her husband was a stay-at-home father who didn’t engage in crime.