A Good Samaritan who tried to stop a woman being assaulted was shot dead outside a store in Texas packed with shoppers on Black Friday, while another man in New Jersey was also killed outside a mall.

The man was driving through a parking lot at a Walmart store in San Antonio when he saw another man punch a woman after grabbing her hair, police chief William McManus told reporters.

When the passer-by shouted at the attacker to leave the woman alone, he was shot in the neck and died of his injuries.

A 31-year-old woman was hit by a stray bullet as she walked into the store and is in a critical condition, while a female passenger with the man who was killed was wounded by shrapnel.

The gunman jumped in his car to flee, but shoppers had already called emergency services. A police helicopter followed him for about 15 miles until he was arrested, police chief McManus said.

Police have arrested a 21-year-old man, Telles Juarez, who is facing charges of murder and aggravated assault. They have not released the names of the victims.

"You have to give credit to the man for being willing to intervene," police chief McManus said. "Unfortunately, this man was too eager to shoot."