A woman was shot and killed when a gunman ran into a busy Los Angeles supermarket where he held dozens of people hostage for about three hours before handcuffing himself and surrendering to police.
About two hours before taking the hostages, police say the man shot his grandmother seven times and wounded another woman, who he forced into a car.
Police chased the vehicle and exchanged gunfire with the man, who crashed into a pole outside the Trader Joe's in the city's Silver Lake section and ran into the store.
Frightened customers and workers dived for cover as police bullets fired at the suspect shattered the store's glass doors.
Some inside the supermarket climbed out windows as scores of police and firefighters and 18 ambulances converged on the scene and 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 about 6.30pm local time, about three hours after the standoff began, the man agreed to handcuff himself and walked out the front door, surrounded by four of the hostages.
The unidentified man, who police said is about 28, was immediately taken into custody.
Police said he had a wound to his arm.
Los Angeles Mayor Eric Garcetti congratulated police and firefighters for their work and mourned the loss of life at the Trader Joe's he and his wife regularly shopped at when they lived in the neighbourhood.
"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, adding "our hearts go out to everyone who has been traumatised."
Among those who survived the harrowing afternoon was 91-year-old Don Kohles.
He was walking into the supermarket when the suspect crashed into the pole and police began firing.
He and others inside took cover and lay on the floor as the suspect ran into the store.
"Those bullets went right over the back of me as he was running right down the main aisle," Kohles said.
After about 30 minutes of terror and sobs, police came inside and rushed out Kolhes and others near him.
The hostage situation that played out on live television began when the suspect shot his grandmother and another woman in South Los Angeles and then forced the other woman into his grandmother's car, Los Angeles Police Chief Michel Moore said.
The grandmother was in critical condition.
Officers were able to track the car using LoJack — a stolen vehicle tracking system — and officers tried to stop the car in Hollywood, but the man refused to pull over, Moore said.
During the chase, the suspect fired at officers, shooting out the back window of his car, before he crashed.
Outside the store, the man exchanged gunfire with police again and a woman was shot and killed, Moore said.
It was not clear if she died from police gunfire or was killed by the gunman.
Christian Dunlop, a real estate agent and actor who lives nearby, said he was watching from the corner when he saw four people flee out the front of the store.
An employee dragged an injured woman by the hands out the front door, he said.
The suspect made a "series of demands" during the standoff but crisis negotiators believed they could convince him to surrender peacefully, Moore said.
"Our hostage negotiators believed they had established a good rapport with him," the chief said.
Around 6.30pm, the suspect walked out.
Fire officials said six people, ranging from 12 to 81 years old, were taken to the hospital. None had been shot and all were in fair condition.