JERUSALEM — The wave of deadly attacks that has roiled Israel this month hit the southern desert city of Beersheba on Sunday, where a Palestinian armed with a pistol and a knife grabbed another weapon from a soldier, fatally shot him and wounded at least nine other people, including several police officers, according to the police.

In the confusion as the attack unfolded, a migrant who was apparently mistaken for a second assailant was shot and seriously wounded by an Israeli security guard, then beaten by a mob. He later died of his wounds, according to Israeli news reports. Witnesses who said they knew the man identified him as an Eritrean asylum seeker.

The Palestinian assailant was killed at the scene by police officers.

After more than two weeks of almost daily attacks, mostly by young Palestinians armed with knives, there had been hope in Israel that Sunday would pass peacefully. But around 7:30 p.m., reports emerged of the shooting at the central bus station in Beersheba.

Based on initial reports, some Israeli commentators considered this attack more sophisticated and requiring more planning than many of the past ones this month, most of which have been carried out in Jerusalem or the West Bank by Palestinians with no known links to militant organizations.