A father chased down and beat to death a thief who stole a car with his children inside, US police have said.

Bystanders also joined in the attack on the 54-year-old man, who later died in hospital of head injuries, said detectives in Philadelphia, Pennsylvania.

Three young children – aged seven months, 18 months, and five years old – were in the Hyundai when the carjacker stole it on Thursday evening.

Their mother had left the car running as she went into a pizza takeaway where her boyfriend – who is the father of the two younger children – was working at 9pm local time.

As the woman was speaking to her partner, the thief climbed into the car and drove off.

The parents, both aged 25, ran after the car, which became stuck in traffic nearby.

“They were able to pull this car thief out of the vehicle,” chief inspector Scott Small, of the Philadelphia Police Department, told local television station WPVI.

“He fled on foot about a half a block. And the boyfriend caught up to him and there was some sort of physical struggle that ensued,” Mr Small said.

“Then other males from the neighbourhood intervened and began punching and kicking the male who took the vehicle.”

The man was taken to hospital with severe head and facial injuries. He was pronounced dead at 10.05pm local time.

The children’s parents were both taken into custody for questioning and were said to be co-operating with investigators.

The police department’s homicide unit and the District Attorney’s Office will decide if the father will face charges.

The three children were unharmed and stayed with other relatives on Thursday night.