A Palestinian teenager stabbed an Israeli man, critically wounding him, at a supermarket in the central Israeli city of Yavneh on Wednesday morning, police said. After initially saying the motive was unclear, police eventually said the stabbing appeared to have been a terror attack.

The stabber was captured by civilians, who held him down until police arrived. He was later identified by the Shin Bet security service as Ismail Ibrahim Ismail Abu Aram, 19, from the West Bank village of Yatta.

Graphic security camera footage from inside the Shufersal supermarket in Yavneh, south of Tel Aviv, showed the moments leading up to the attack and the stabbing itself.

The 43-year-old victim, who worked at the supermarket, was stocking shelves with paper towels on one of the aisles, paying no mind to the teenager who walked past him.

Suddenly the attacker turned around, took out a knife and began viciously stabbing the supermarket employee in the upper body. Though injured, the victim fought off the terrorist and tried to run away from him, blocking the aisle after him with a handcart.

The victim could then be seen running to a nearby aisle, and out of frame, with the assailant chasing him.

He suffered stab wounds to the chest, neck and head and was in unstable condition, according to medical officials.

The victim was taken to the Kaplan Medical Center in the nearby city of Rehovot, the Magen David Adom emergency service said.

A hospital spokesperson said the victim was in critical condition. He was unconscious and hooked up to a ventilator.

Doctors in the hospital’s trauma center worked to stop the bleeding, before the victim was taken to an operating room for “life-saving surgeries,” the spokesperson said.

During the attack, someone in the supermarket apparently tried to use pepper spray on the attacker and in the process hit a number of other people in the store, who required medical attention, an MDA medic said.

After the stabbing, the Palestinian teenager fled the scene and was tackled to the ground by civilians.

According to the Shin Bet, Abu Aram entered Israel illegally, without an entry permit.

Videos from the scene showed the moments after the suspect was captured. In the footage, a few men can be seen kicking and cursing the stabber, while others push them away.

One man also takes out a handgun, before others tell him, “Don’t go overboard.” The man with the pistol quickly clarifies that he “isn’t going to shoot anybody” and proceeds to keep others away from the scene until police arrives to arrest the suspect.

The past two years have seen an ongoing wave of violence in the West Bank and Israel that has lessened in intensity in recent months.

Since September 2015, assailants have killed 48 Israelis, two visiting Americans, a Palestinian man and a British student, mainly in stabbing, shooting and vehicular attacks. In that time, some 280 Palestinians have been killed by Israeli fire, a majority of them attackers, according to authorities.

The Israeli government has blamed the terrorism and violence on incitement by Palestinian political and religious leaders compounded on social media sites that glorify violence and encourage attacks.