Israeli forces killed an Arab Israeli Friday who was wanted for the murder of three people in a Tel Aviv shooting spree last week, the minister for public security said.
Gilad Erdan announced the "elimination of the terrorist" in a statement.
Israeli media showed pictures of Nashaat Melhem's body outside the building where he had been holed up.
Israeli Prime Minister Benjamin Netanyahu praised the security services, who worked "tirelessly, systematically, and professionally until they spotted and neutralised the terrorist".
Melhem, 31, had been on the run since January 1, after allegedly firing on customers at a Tel Aviv bar and neighbouring cafe, killing two people
Authorities say he later shot dead an Arab Israeli taxi driver.
The police confirmed they had surrounded a building in which he had been hiding in his hometown of Arara.
Melhem left the building and a gunfight erupted with security forces, during which he was shot dead, police said.
Signup to our newsletter and follow us on Facebook and Twitter!
Melhem’s disappearance sparked a mass manhunt across Israel, with forces deploying across the country and a media gag order placed on details of the investigation.
Security camera footage from a store near the scene of the attack showed a bespectacled man with a backpack calmly pretending to shop before going to the exit, placing the backpack on a trolley, removing what looked like a submachine gun and opening fire in the street.
Melhem's father contacted police to identify him, but was later arrested on suspicion of aiding his escape, despite repeatedly called on his son to turn himself in.
In the days after the attack, many Israeli parents took their children out of school for fear of another attack.
The Israeli authorities had been reluctant to specify the motives of the attack.
Melhem was jailed in 2007 for attacking an Israeli soldier in what he said was an attempt to avenge the death of a relative shot by police in 2006.
Before Friday's shootout, speculation had grown that he had snuck into the Palestinian-run West Bank, raising the pressure on Netanyahu.
Twenty-two Israelis, an American and an Eritrean have been killed in Palestinian attacks including stabbings, car rammings and gunfire targeting security forces and civilians since October 1.
At the same time, 144 Palestinians have been killed by Israeli forces, most while carrying out attacks, with polls showing public dissatisfaction over Netanyahu's management of the crisis.