Updated

The man wanted for the murder of three people in a Tel Aviv shooting spree was shot and killed by Israeli police Friday in the northern part of the country, investigators revealed.

The gunman had been identified as Nashat Milhem, an Arab from northern Israel who had been working at a grocery store in Tel Aviv before the attack.

Milhem was found hiding Friday in a mosque in the northern city of Um Al Fahem, police said.

The shooting on Tel Aviv's busy Dizengoff Street last Friday, which killed two Israeli men and wounded six other people, was recorded on security cameras at a health food store next door.

Police spokeswoman Luba Samri said Milhem had opened fire at the police with the same gun he used in the attacks in Tel Aviv.

Hakim Younis told Channel 10 TV that he witnessed some of the incident from his home.

"I was sitting on my balcony with my cousin ... when suddenly, shooting began, hundreds of bullets, like in a war," Younis said, adding that he then went inside and didn't see anything further.

Israelis are used to quickly resuming their daily routines following attacks because assailants are usually swiftly captured or killed. But the Tel Aviv shootings left Israelis jittery because Milhem, who was considered armed and dangerous, was on the loose for a week.

In footage of the Tel Aviv attack, a man with short dark hair, glasses and a black bag over his shoulder is seen scooping up nuts from the shop's bulk food section, putting them in a plastic bag, then emptying them back. He then walks to the store entrance, places his backpack on a shopping cart and takes a gun out of it before stepping outside and opening fire into the bar. He then runs away.

Police say that after tossing his cellphone, Milhem hailed a cab that took him to northern Tel Aviv, where he killed the driver and escaped in the taxi before abandoning it and going off the grid.

Authorities got their first lead when Milhem's father, Mohammed, recognized his son from the closed circuit footage aired on TV. Milhem apparently obtained the licensed semi-automatic weapon he used by stealing it from his father, a security guard. The father condemned the killing and called on his son to turn himself in. Residents of their Arab town, Arara, also quickly denounced the attack.

Police say they found a Koran in Milhem’s bag, hinting at Islamic inspiration, though family members say he was emotionally unstable and traumatized after a cousin was shot dead in a 2006 police arrest raid. At the time, police said they were searching for weapons and claimed the shooting was in self-defense.

Milhem served time in an Israeli prison after being convicted of attacking a soldier and trying to steal his weapon. But he was also described by residents of the upscale Tel Aviv neighborhood where he worked as a grocery store delivery man as being so trusted that customers gave him their house keys to make deliveries when they were out.

The near-daily Palestinian attacks on Israeli civilians and soldiers have killed 21 Israelis, mostly in stabbings, shootings and car-ramming assaults. At least 134 Palestinians died by Israeli fire, including 93 said by Israel to be attackers. The rest were killed in clashes with troops. These figures do not include Milhelm's victims.

The Associated Press contributed to this report.