Two Palestinian gunmen opened fire on shoppers and diners Wednesday night at a marketplace near the Israeli Defense Ministry in Tel Aviv, killing four people and wounding five.
Israeli police called the incident a terrorist attack and said the gunmen used automatic weapons.
Israeli police had both shooters in custody; one was hospitalized after being shot. The gunmen were identified as two cousins from the West Bank town of Hebron.
Prime Minister Benjamin Netanyahu said after a meeting with his security chiefs that this was a "savage crime."
"We are going to take the necessary steps to attack the attackers and to defend those that need to be defended," he said.
The U.S. State Department condemned "in the strongest possible terms" what it called a horrific and cowardly terrorist attack against innocent civilians.
U.N. Secretary-General Ban Ki-moon also condemned the attacks, saying in a statement that he was "shocked that the leaders of Hamas have chosen to welcome this attack and some have chosen to celebrate it."
Hamas has not officially claimed responsibility for the shootings, but a Hamas official, Mushir al-Masri, called them a "heroic operation", and the group later released a statement warning "Zionists" of more "surprises" during the holy month of Ramadan.
Wednesday's shootings were carried out at the Sarona marketplace in central Tel Aviv, a popular gathering place for shopping and dining. Security footage broadcast on Israeli television showed frantic diners scrambling for safety between tables and overturned chairs.
The gunmen, well-dressed in coats and ties, shot some of their victims at point-blank range.
Israeli police spokesman Micky Rosenfeld said there had been no attacks on Israeli civilians and police in Tel Aviv in months and no concrete intelligence that a terror strike was in the works.
He said police would investigate how the gunmen were able to slip into the area, including reports that they were disguised as ultra-Orthodox Jews.
Israel has seen a relative lull in nine months of Palestinian attacks on Israeli civilians and police, sparked by rumors that Israel was planning to take over an East Jerusalem religious site sacred to Muslims and Jews.