The shooting spread panic, and video posted on social media showed a uniformed officer firing a handgun, though his target could not be seen.
Police said one of the attackers was arrested, while the other was wounded by gunfire and undergoing surgery.
Five people were wounded in addition to the four killed at the Sarona Market in Israel’s commercial capital, police said.
Prime Minister Benjamin Netanyahu visited the scene of what he called the “cold-blooded terrorist murder” after returning from a trip to Moscow and conferred with senior colleagues, including newly installed defence minister Avigdor Lieberman, Netanyahu’s office said in a statement early Thursday.
“We discussed a range of offensive and defensive steps which we shall take in order to act against this phenomenon,” it quoted the premier as saying.”There will be intensive action by the police, the army and other security services, not just to catch every accomplice to this murder but also to prevent further incidents.”
Israeli authorities said the two attackers were cousins from the Hebron area in the occupied West Bank. The market and complex of bars and restaurants is located across the street from Israel’s defence ministry and main army headquarters.
The nighttime shooting led police to clear the area. Police said the wounded included those sitting at a coffee shop in the complex. The assailants’ weapons had been retrieved, they said.
“We are talking here about a pretty serious terrorist incident,” Tel Aviv police chief Chico Edri told reporters. “Of the two terrorists, one was arrested and the other wounded by gunfire,” he said.
“We do not know of another terrorist at large and so from our point of view people can return to their normal lives,” he added. The nationalities and other details of the victims were not yet known.
The United States called the shooting a “horrific terrorist attack”.
“These cowardly attacks against innocent civilians can never be justified. We are in touch with Israeli authorities to express our support,” State Department spokesman Mark Toner said.
UN Special Coordinator for the Middle East peace process, Nickolay Mladenov, said “all must reject violence and say no to terror”.
“I am also shocked to see Hamas welcome the terror attack. Leaders must stand against violence and the incitement that fuels it, not condone it,” he said in a statement.