JERUSALEM — A Palestinian opened fire and stabbed shoppers with a screwdriver near a busy open air market in central Israel on Thursday, wounding at least six people, police said.

Spokesman Micky Rosenfeld said police confirmed it was a “terror attack” and that the 18-year-old Palestinian from the West Bank was arrested soon after the shooting in Petah Tikva.

Israeli media reported that the Palestinian attacker fired at a bus and toward shoppers buying groceries at the market ahead of the Jewish Sabbath, before running down the street. He continued shooting as civilians gave chase.

The Ynet news site said he fled into a repair shop for sewing machines, where passers-by tackled him. They threw a sewing machine and chairs at the attacker and subdued him before police detained him. The site published a photo of a blood- stained sewing machine from the scene.

The Palestinian stabbed an Israeli in the neck with a screwdriver in the struggle.

 Israel’s ambulance service said a man and a woman in their 50s and a woman in her 30s were treated for bullet wounds to their lower bodies. A 40-year-old man was stabbed in his upper body, it said.

At least six people were wounded, said police spokesman Ami Ben David.