An Israeli Arab man was stabbed by a Palestinian assailant in Tel Aviv suburb Petah Tikva late Monday morning, in what police said was a terror attack and case of mistaken identity.

Police said the victim, a 32-year-old Egged bus driver, was attacked at a shwarma stand in the city center and was stabbed in the neck. He was rushed to hospital with moderate-to-severe injuries.

The assailant then tried to escape on foot, but was wrestled to the ground by civilian bystanders and handed over to police. Some reports said a driver who was passing by helped stop the attacker by ramming him with his car as he tried to escape. Others said a local pizzeria worker helped subdue him by hitting him with a wooden pizza tray.

Get The Times of Israel's Daily Edition by email and never miss our top stories Free Sign Up

The assailant, a 21-year-old Palestinian from the West Bank town of Qalqilya, was arrested and taken for questioning by police.

Police spokesman Luba Samri said Monday’s attack was nationalist in nature. She said the attacker was a Palestinian working illegally in Israel.

The Shin Bet internal security agency said the the man, whose name has not been revealed, had been jailed in Israeli prison between 2015-2016, for violent activity against Israel.

According to the Hebrew media, the assailant told police investigators that he carried out the attack in response to Israel’s actions at the Temple Mount compound in Jerusalem. “I did it for Al-Aqsa,” he reportedly said.

Walla news reported that the victim was an Egged bus driver. An Egged official told the website that the driver was on a break at the time of the attack and said the stabber must have thought he was Jewish.

“He was fully conscious and was sitting upright on a chair, suffering from bleeding stab wounds to his upper body,” Magen David Adom paramedic Tom Dagan said. “We provided him with lifesaving medical treatment, stopped his bleeding wounds, transported him onto an MDA mobile intensive care unit, and evacuated him to Beilinson Hospital in moderate-severe condition.”

An employee at the schwarma shop told the Ynet news website: “A man came in and ordered schwarma. There was nothing out of the ordinary about his behavior. Afterwards an Egged driver came in who eats with us regularly. He placed his order and went over to the refrigerator to take a soft drink. As I was preparing his order another driver came in and I suddenly heard him shout, ‘Terror attack, terror attack!'”

Israel has been on edge amid the spiraling tensions at the Temple Mount and after a weekend of deadly violence.

Clashes have broken out over Palestinian opposition to metal detectors installed at the entrances to the compound. Israeli authorities say the metal detectors are needed following a shooting attack by three Arab Israelis on July 14 who killed two policemen using weapons they had smuggled into the holy site.

Five Palestinians have been killed during violent riots over the new measures.

On Friday, a Palestinian broke into a home in the West Bank settlement of Halamish and stabbed three Israelis to death, leading to fears of a new outbreak of terror attacks.

Agencies contributed to this report.