IRMO (AP) — A robbery suspect who was shot and killed by Richland County deputies on Thursday night used a pistol he had stolen the day before in the gun battle, Sheriff Leon Lott said.

The shooting happened after a short chase on U.S. 176 near Irmo around 7 p.m. on Thursday.

Lott said he feels lucky the suspect was the only person hit by bullets as dozens of shots were likely fired within 100 yards of a busy restaurant.

“It could have been potentially a lot worse,” Lott said.

The name of the dead man has not been released because his family has not been notified.

Lott said he was a 34-year-old man with previous burglary and assault charges and his family tried to have him committed for mental issues two months ago, but he was evaluated and released.

“At this point, we can’t say if that contributed to last night or not. It is something we will look into,” the sheriff said.

Lott said the suspect emptied one 17-round magazine and stole at least three more fully loaded magazines on Wednesday. He said deputies haven’t figured out exactly how many shots were fired, but some fired bullets were found on U.S. 176 after the shootout.

The State Law Enforcement Division is investigating the shooting as it does in all cases where police officers fire their weapons.