Israeli police said they had shot dead a Palestinian gunman who had killed two people and wounded several others in Tel Aviv, the latest in a surge of violence.

The attacker had shot at revellers at a bar on the busy Dizengoff Street in the coastal city of Tel Aviv just after 9pm local time last night, triggering chaos as people fled in panic.

The Palestinian Islamist movement Hamas, which controls Gaza, and the Islamic Jihad, praised the attack.

Israel's Shin Bet security agency named the assailant as Raad Hazem, 28, from Jenin in the north of the Israeli-occupied West Bank.

Special forces found the attacker "hiding near a mosque in Jaffa", referring to the historically Arab quarter of Tel Aviv, according to the Shin Bet.

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," Mr Bennett said.

"Our war on murderous terrorism is long and hard. We will win."

The Magen David Adom medical emergency service said 16 people had been taken to hospital, including "two dead, four seriously wounded," and adding it remained "on high alert".

Tel Aviv's Ichilov Hospital, which was treating eight people injured in the shooting, said this morning that one of the victims was "in critical condition with an immediate risk to his life".

Immediately after the attack, police had closed roads and ordered public transport shut down as they hunted for the suspect, with more than 1,000 officers and Israeli soldiers deployed.

Heavily armed forces patrolled the streets lined with cocktail bars and fashion boutiques, as the city's normally bustling roads were emptied.

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 scurried to shelter.

"We all ran in the back, it was so scary," Ms Roberts said. "You hear real shooting, it was like a nightmare."

She said 50 people cowered for two hours 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."

This was the fourth fatal attack in Israeli cities in two weeks, with 13 victims killed in the violence.

On 29 March, a Palestinian gunman - also from the Jenin area - opened fire with an M-16 assault rifle in Bnei Brak, a Jewish mostly ultra-Orthodox city near Tel Aviv.

He killed two Ukrainian men and two Israeli civilians. An Arab-Israeli officer died of wounds sustained in an ensuing gunfight that also killed the assailant.

In response to that attack, Israeli troops raided the northern West Bank, killing three fighters from Islamic Jihad in gun battles.

On 22 March, a convicted Islamic State group sympathiser killed four Israelis in a stabbing and car-ramming spree in the southern city of Beersheba, before police killed the attacker, a Bedouin citizen of Israel.

The Tel Aviv attack also came with Israeli police 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 conflict between Israel and Hamas.