A migrant mistaken for an attacker died after an Israeli security guard shot him and bystanders beat him at a bus station, Israeli hospital officials said Monday.

The incident happened Sunday after an Arab man armed with a gun and knife opened fire, killing a 19-year-old Israeli soldier and wounding nine other people, according to investigators.

The shooting of the Eritrean migrant reflected the shattered nerves among Israelis after months of seemingly random lone-wolf attacks by Palestinians.

"It's terrible," said Foreign Ministry spokesman Emmanuel Nahshon. "It shows you what a terrible situation we are in."

The daily newspaper Yediot Ahronot left no ambiguity as to exactly why the man, identified as Mulu Habtom Zerhom, was shot. Monday's headline read: "Just because of his skin color."

Dr. Nitza Neuman-Heiman, deputy general director of Soroka Medical Center, told Army Radio that Zerhom arrived at the hospital in "very serious condition" and died late Sunday from both gunshot wounds and the injuries sustained during attacks by bystanders. The hospital said he suffered gunshot wounds to the abdomen.

The attack, at the central bus station in the southern city of Beersheba, was among the bloodiest in a monthlong wave of violence.

Israeli news websites posted security camera footage that shows Zerhom, crawling on the floor and a security guard shooting him. Footage also showed a mob of shouting Israelis crowded around the man as he lay in a pool of blood. A bench was rammed at him and he was kicked in the back of the head, as an Israeli officer and a few bystanders tried to protect him.

An Israeli identified only by the first name Dudu told Israeli Army Radio that he regretted participating in the attack on the Eritrean migrant.

"I understood from people he was a terrorist. If I would have known he wasn't a terrorist, believe me, I would have protected him like I protect myself," he said. "I didn't sleep well at night. I feel disgusted."

Police are seeking to arrest those Israeli civilians who "aggressively beat" and kicked the Eritrean man "while he lay on the floor and posed no threat," police spokeswoman Luba Samri said.

During a month of violence, nine Israelis and the Eritrean have been killed in a wave of shootings and stabbings by Palestinian assailants. Forty-one Arabs — including 20 identified by Israel as attackers — have been killed, with the rest dying in clashes with Israeli troops.

The attacks, carried out seemingly randomly by attackers with no known membership to organized militant groups, have unnerved Israel.

Zerhom was in Beersheba to renew his Israeli visa, his employer at a plant nursery, Sagi Malachi, told Army Radio.

About 34,000 Eritrean migrants are in Israel. They say they are fleeing persecution and conflict and seek refugee status. Israel does not grant them refugee status, but does not deport them to Eritrea in line with international law so as not to endanger their lives. Migrants must renew Israeli visas every month or two, according to migrant activists.

African migrants began pouring into Israel in 2007, with their numbers steadily growing until Israel built a fence along the Egyptian border in 2012. Many Israelis fear the influx threatens the country's Jewish character, with one right-wing Israeli lawmaker calling migrants a "cancer." Migrants say they experience racial discrimination in Israel.

"The death of an asylum seeker at the hands of security guards and an angry mob is a tragic but foreseeable outgrowth of a climate in which some Israeli politicians encourage citizens to take the law into their own hands," said Sari Bashi of Human Rights Watch

Israeli police identified the assailant as 21 year-old Mohannad al-Okbi, an Arab citizen of Israel, from the Bedouin town of Hura in southern Israel. He was shot and killed in the attack. Security officers arrested one of al-Okbi's relatives on suspicion that he assisted the attacker, Samri said.

The Israeli security agency Shin Bet said the attacker had no past record of involvement in militant activity.

The violence began last month with clashes between young Palestinian men and Israeli forces at the most sensitive holy site in Jerusalem — a hilltop compound revered by both Jews and Muslims. The violence quickly spread to the rest of Jerusalem, across Israel and into the West Bank and Gaza Strip. The clashes were fueled by Palestinian allegations that Israel seeks to change the status quo banning Jewish prayer at the site, allegations Israel denies.

Israel has accused Palestinian and Muslim leaders of inciting violence against Israel. Palestinians say the violence is in response to anger over the Jerusalem holy site and also nearly 50 years of occupation and lack of hope for the future.

The Associated Press contributed to this report.