The Palestinian Islamist movement Hamas, which controls the Gaza Strip, and the Islamic Jihad, praised the attack but have stopped short of claiming responsibility. The two men killed were named as Tomer Morad and Eytam Magini, both 27 and childhood friends from the city of Kfar Saba, the mayor Rafi Saar said, who called them "our best sons."
Special forces confronted the attacker in the old city of Jaffa, the historic Arab district of Tel Aviv, where on Friday morning, street cleaners scrubbed bloodstains off the ground. Israel's Shin Bet security agency named the assailant as Raad Hazem, 28, from Jenin in the north of the Israeli-occupied West Bank, where last week Israeli forces killed three in a raid.
Israeli Prime Minister Naftali Bennett praised the security forces for their response. "We maintain maximum alertness, within Tel Aviv and throughout the country, for fear of further incidents or imitation attacks," Bennett said.
Thursday's attack in Tel Aviv came as Israeli police are on alert for the first Friday prayers of the Muslim holy month of Ramadan at Al-Aqsa Mosque in annexed east Jerusalem. The third-holiest site in Islam, it is a flashpoint in the long-running Middle East conflict and scene of frequent clashes.
Last year, nightly demonstrations in Jerusalem and the Al-Aqsa compound escalated into 11 days of war between Israel and Hamas.
A total of 13 people have been killed in attacks in Israel since March 22, including some carried out by assailants linked to or inspired by the Islamic State group. Over the same period, at least nine Palestinians have been killed, including assailants.
Following the Tel Aviv attack, the Magen David Adom medical emergency service said 16 people had been taken to hospital, with "four seriously wounded".
Tel Aviv's Ichilov Hospital, which was treating eight people injured in the shooting, said Friday morning that one of the victims was "in critical condition with an immediate risk to his life".
On Friday, outside the bar where the attack took place, mourners lit candles and left flowers.
Noa Roberts, 21, who works at a bar across the street from the attack, said she heard dozens of bullets as terrified customers and staff raced to shelter. "We all ran in the back, it was so scary," Roberts said. "You hear real shooting, it was like a nightmare."
She said 50 people cowered for two hours at her bar until police told them they could leave. "My boss has a gun and he joined the police to help them," she added.
US Secretary of State Antony Blinken condemned the "terrorist attack" and said Washington stood with Israel "in the face of senseless terrorism and violence."
Border crossing closed
The Israeli army said Friday the Jalama border crossing from the northern West Bank into Israel would be closed, as troops step up their presence in the area. On Thursday night, Islamic Jihad "welcomed" the attack as a "natural response" to Israel's "crimes", including a recent raid on the West Bank city of Jenin, where the alleged attacker was from.
One of its leaders, Yussef al-Hasainah, said: "It confirms that the resistance can penetrate the security system... and that the resistance will continue and that it is the best choice to deter the arrogant enemy".
The Hamas militant Islamist group that controls the Gaza Strip praised what it called a "heroic operation... which led to the killing of a number of occupying soldiers and Zionist settlers."
The Iran-backed Hezbollah movement on Friday called the murders in the bar a "victorious" attack saying that the Palestinian people's "determination is stronger than the occupier's will".