A Palestinian family at an Israeli checkpoint between the West Bank town of Bethlehem and Jerusalem on June 10, 2016
Jerusalem (AFP) - Israel on Friday temporarily barred Palestinians from entering the country, a step criticised by the UN but which officials said was a response to this week's deadly Tel Aviv shooting.
Thousands of Palestinians from the occupied West Bank, however, were allowed to attend weekly Muslim prayers at Al-Aqsa mosque compound in Israeli-annexed east Jerusalem.
An army spokeswoman told AFP that crossings to Israel from the West Bank and Gaza Strip would be closed for Palestinians in all but "medical and humanitarian cases".
She said the closure would remain in force until midnight on Sunday.
The measures came during the first Friday of the Muslim holy month of Ramadan, when tens of thousands of Palestinians visit Al-Aqsa to pray.
A spokeswoman for COGAT, the defence ministry unit which manages civilian affairs in the West Bank, said about 10,000 Palestinians were allowed to visit Al-Aqsa despite the ban.
The worshippers had to return home after Friday prayers, the spokeswoman said.
Palestinian men between 12 and 35 were not allowed to enter the mosque, with those between 35 and 45 needing permission and those older than 45 having unrestricted access, police confirmed.
Passage was unrestricted for women.
Sheikh Azzam al-Khatib, head of the Islamic Waqf which administers Al-Aqsa, said 100,000 people attended Friday prayers, down from more than 200,000 the year before.
Police declined to give a specific figure, giving an estimate of tens of thousands.
Prime Minister Benjamin Netanyahu convened his security cabinet on Thursday and announced a slew of measures against Palestinians after Wednesday's shooting in a popular Tel Aviv nightspot that killed four people, the deadliest attack in a months-long wave of violence.
Among the measures, the government said it was revoking entry permits for more than 80,000 Palestinians to visit relatives in Israel during Ramadan.
It also revoked work permits for 204 of the attackers' relatives and the army blockaded their West Bank hometown of Yatta, with soldiers patrolling and stopping cars.
The government also said it was sending two additional battalions -- amounting to hundreds more troops -- into the West Bank.
- Assailants' bodies held -
United Nations rights chief Zeid Ra'ad Al Hussein's office in a statement on Friday condemned the attack but said the Israeli measures may amount to "collective punishment".
"The measures taken against the broader population punish not the perpetrators of the crime, but tens -- maybe hundreds -- of thousands of innocent Palestinians," it said.
French Foreign Minister Jean-Marc Ayrault expressed concern that the Israeli measures risked "fuelling tensions", while the US State Department hoped they would not increase tensions.
Newly installed Defence Minister Avigdor Lieberman ordered that the bodies of Palestinians killed while carrying out attacks would no longer be returned to their families for burial, a spokesman said.
The policy is backed by Israeli hawks as a deterrent measure.
Israel last closed its crossings for two days in May during its Remembrance Day and Independence Day commemorations.
A closure is often imposed over Jewish holidays, when large numbers of Israelis congregate to pray or celebrate, presenting a potential target for Palestinian attacks.
The start of April's Passover festival saw this type of shutdown.
Public Security Minister Gilad Erdan said the police in Jerusalem would safeguard both Muslim and Jewish prayers at the city's holy sites over the weekend, which will also see the Jewish festival of Shavuot begin late Saturday.
"We of course want to allow (Jewish) worshippers here in the Old City and throughout Jerusalem to pray in safety and also for Muslims to get here freely and allow them freedom of worship," he said in an address broadcast from the Western Wall, the holiest site where Jews can pray.
"We are in the wake of a harsh attack and we continue today to bury some of those murdered in the attack," Erdan said.
"The security forces and the police are doing everything they can, every day, and during the holiday ahead of us."
Violence since October has killed at least 207 Palestinians, 32 Israelis, two Americans, an Eritrean and a Sudanese.
Most of the Palestinians were carrying out knife, gun or car-ramming attacks, Israeli authorities say.
Others were killed in clashes with security forces or by Israeli air strikes in the Gaza Strip.
On Friday, a Palestinian who tried to stab soldiers at a checkpoint near the West Bank city of Nablus was wounded by Israeli fire, the army said.