Israel's cancellation of entry permits for Palestinians following a deadly attack in Tel Aviv may amount to collective punishment, which is banned under international law, according to the office of the UN's top human rights official.

The Israeli military on Thursday revoked permits for 83,000 Palestinians to visit Israel and said it would send hundreds more troops to the occupied West Bank, a day after a gun attack that killed four Israelis and wounded five in a busy shopping and dining market in Tel Aviv. The two suspects were reportedly Palestinian and disguised as Orthodox Jews.

UN High Commissioner for Human Rights Zeid Ra'ad Al Hussein's office condemned the attack, but also expressed deep concern about the revoking of permits.

Interactive: Vanishing Palestine - The making of Israel's occupation

"[This] may amount to prohibited collective punishment and will only increase the sense of injustice and frustration felt by Palestinians in this very tense time," his spokeswoman Ravina Shamdasani told a news briefing.

Measures included the suspension of 204 work permits of individuals in the alleged attackers' extended families and the sealing off of their entire home town by Israeli security forces, she added.

Israel boosts troops in West Bank after Tel Aviv attack

"Israel has a human rights obligation to bring those responsible to account for their crimes. And this, it is doing. However, the measures taken against the broader population punish not the perpetrators of the crime, but tens, and maybe hundreds, or thousands of innocent Palestinians," said Shamdasani.

The entry permits had been issued to Palestinians from the Israeli-occupied West Bank to visit relatives during the current Islamic holy month of Ramadan.

'Stoking tensions'

Later on Friday, Israel's ban was also criticised by France, which currently holds the presidency of UN Security Council.

Speaking to reporters, French Foreign Minister Jean-Marc Ayrault condemned the "abominable" attack but added that the imposed travel restrictions could escalate violence, instead of focus attention on the need to pursue peace.

"The decision by the Israeli authorities today to revoke tens of thousands of entry permits could stoke tensions which could lead to a risk of escalation," Ayrault said.

"We must be careful about anything that could stoke tensions."

There was no immediate claim of responsibility for the assault by the two gunmen, but Hamas, the Palestinian group that governs the Gaza Strip and which is also present in the West Bank, was quick to praise it.

The market and complex of bars and restaurants, where the attack took place, is located across the street from Israel's defence ministry and main army headquarters.

Inside Story - Israel and Palestine: How to stop the violence?

Source: Al Jazeera and agencies