Prosecutors say a gunman who took hostages inside a Los Angeles supermarket has been charged with murder, attempted murder and dozens of other charges.

The Los Angeles county district attorney’s office says Gene Evin Atkins is scheduled to be arraigned Tuesday on 31 charges.

Police say Atkins shot his grandmother seven times, kidnapped his 17-year-old girlfriend and shot at officers as they chased his car and then as he ran into the Trader Joe’s in the city’s busy Silver Lake neighborhood on Saturday afternoon.

Police chief Michel Moore said a store worker, Melyda Corado, was killed by a police officer’s bullet as Atkins exchanged gunfire with officers while he ran into the store.

Corado, 27, was leaving the store in Silver Lake on Saturday as Atkins, 28, was going in.

Atkins fired two rounds at officers pursuing him, Moore told reporters. The two officers each fired back. One round went through one of Corado’s arms and into her body.

The officers had to consider whether the suspect in what was already a long-running series of violent events would become an active shooter in a market crowded with weekend shoppers, Moore said.

“That is the worst, worst decision that any officer ever wishes to have to make,” the chief said.

The events began about 1.30pm in south Los Angeles when Atkins allegedly shot and wounded his 76-year-old grandmother and fled in a stolen car, taking a 17-year-old girl who was grazed by a bullet. Moore said that was a kidnapping.

Around 3pm, officers spotted Atkins in Hollywood and got into a car chase. Moore said Atkins fired through the rear window of his vehicle, but the officers did not fire back at that time.

About 15 minutes later, Atkins crashed his car into a utility pole outside the Trader Joe’s, where the gun battle erupted. Corado was shot dead and Atkins was wounded in the arm. Employees and customers fled or hid.

Atkins held some as hostages, let some go and then surrendered several hours later. Investigators recovered casings of the two bullets fired at the officers, Moore said.