JERUSALEM — An Eritrean asylum seeker who was mistaken for an assailant in an attack Sunday at a bus station in Beersheba was shot by a security guard and then beaten by a mob.

Early Monday, he died of his wounds.

Graphic video images of the beating appeared to show people kicking the Eritrean man, identified by the Israeli authorities as Haptom Zerhom, 29, and hurling a chair and bench at his head as he lay injured on the ground.

The Hebrew newspaper Yediot Aharonot wrote that Mr. Zerhom had been running from danger when an Arab gunman shot and killed an Israeli soldier and Mr. Zerhom was mistaken for a second attacker “just because of the color of his skin.”

Eritrean friends of Mr. Zerhom who gathered in a Tel Aviv park on Monday to mourn him said he had come to Israel four years ago to escape the difficulties in his home country.