A gunman who got into a deadly shootout with police and then took dozens of people hostage at a Los Angeles supermarket has been arrested on suspicion of murder, authorities said on Sunday.

Gene Evin Atkins, 28, was being held on $2m bail, according to Drake Madison, a Los Angeles police spokesman. It was not clear if he had an attorney and a message left at a number listed for him in public records was not immediately returned.

Melyda Corado, 27, was shot and killed when Atkins ran into the Trader Joe’s supermarket in Los Angeles’ Silver Lake section on Saturday, but no hostages were seriously hurt before the man handcuffed himself and surrendered about three hours later, police said.

Coroner’s officials identified Corado on Sunday. Her brother, Albert Corado, said on Twitter that she worked at Trader Joe’s. “I’m sad to say she didn’t make it. My baby sister. My world,” he wrote.

Authorities said Atkins shot his grandmother seven times and wounded another woman, whom he forced into a car, at a South Los Angeles home around 1.30pm on Saturday. Officers tracked the car, gave chase and exchanged gunfire with the man, who crashed into a pole outside the supermarket and then ran inside, they said.

The unidentified woman, who suffered a graze wound earlier, was taken out of the car by police. Atkins’s grandmother was hospitalized in critical condition and police had no update on her condition on Sunday.

Frightened customers and workers dove for cover as police bullets fired at the man shattered the store’s glass doors. Some people inside the supermarket climbed out windows and others barricaded themselves in rooms as scores of police officers and firefighters and 18 ambulances converged on the scene, prepared for mass casualties.

Heavily armed officers in riot gear stood along the side of the store and used mirrors to look inside as hostage negotiators tried to coax the man into freeing his 40 to 50 hostages and surrendering. At around 6.30pm, Atkins agreed to handcuff himself and walked out the front door, surrounded by four of the hostages. He was immediately taken into custody.

Los Angeles’s mayor, Eric Garcetti, congratulated police and firefighters for their work and mourned the loss of life at the Trader Joe’s, where he and his wife regularly shopped when they lived in the neighborhood.

“The heroism that was shown today was second to none, and the teams that were able to respond, secure the perimeter and engage in conversation with the suspect no doubt saved lives today,” he said.

Among those who survived the harrowing afternoon was 91-year-old Don Kohles, who lives in the neighborhood and was walking into the supermarket when he saw “two police cars coming like a bat out of hell” and the man crashed into the pole. The driver got out, and police started firing at him as he ran toward the supermarket. Kohles hurried inside, and he and others took cover as the man ran in.

“Those bullets went right over the back of me as he was running right down the main aisle,” Kohles said.

Christian Dunlop, a real estate agent and actor who lives nearby, was on a corner near the store when he saw four people run out. One person, an employee, was dragging an injured woman by the hands.

“She appeared lifeless,” Dunlop said. He then saw five employees hang out of a second-floor window and drop to the ground and about 15 others run to safety from the back of the store. Among them was a police officer carrying a small child, he said.

The police chief, Michel Moore, said the gunman made a “series of demands” during the standoff but crisis negotiators believed they could persuade him to surrender peacefully.

Officers had tracked the car using a stolen-vehicle tracking system and tried to stop the man in Hollywood, but he refused to pull over, Moore said. During the chase, the man fired at officers, shooting out the back window of his car.

Outside the store, the man exchanged gunfire with police again and that was when Corado was shot and killed, Moore said. It was unclear if she died from police gunfire or was killed by the gunman.

Fire officials said six people, ranging in age from 12 to 81, were taken to hospital. None had been shot, and all were in fair condition.