JERUSALEM - Israel boosted security and barred Palestinians from entering from the occupied West Bank or the Gaza Strip ahead of the Jewish Yom Kippur holiday that begins on Tuesday evening.

Thousands of Jews visit the Western Wall in east Jerusalem’s Old City around Yom Kippur, or Day of Atonement, which ends on Wednesday evening.

The same occurred for last week’s Rosh Hashanah holiday and will take place again for next week’s Sukkot festival.

Last year’s holiday period led to clashes and marked the start of an upsurge in Palestinian gun, knife and car-ramming attacks. Israeli security forces are on especially high alert following a Palestinian gun attack in Jerusalem on Sunday that killed two people.

More than 3,000 police are being deployed in the city for the holiday.

On Monday night, tens of thousands of Jews crowded into the square around the Western Wall, police spokesman Micky Rosenfeld said.

Prayers led by Israel’s two chief rabbis began shortly after midnight and continued until sunset for some worshippers, in one of the largest Jewish ceremonies of the year.

Moshe Cohen, a 19-year-old from Jerusalem, said the ceremony was among the most important days in the Jewish calendar. “You pray and you get free (of) all the bad things you do,” he told AFP. “You feel connected to God.”

Cohen said he felt the number of faithful was roughly similar to last year. Rosenfeld did not provide a specific figure. Many Palestinian shops in the Old City remained closed.

Near the Lions’ Gate entry to the Old City, used by many Palestinians, Israeli forces erected a temporary barrier stopping cars from going further.

Closures of the Palestinian territories are often put in place for major Jewish holidays.

The closure in place Tuesday and Wednesday applies only to Palestinians and not the roughly 400,000 Israeli settlers who live in the West Bank.

The Gaza Strip is always under an Israeli blockade, though some crossings are usually allowed for work or medical purposes.

Humanitarian and urgent medical cases will be allowed through during the holiday despite the closure, the army said.

Beyond visits to the Western Wall, the holidays also see an increased number of Jewish visitors to the adjacent Al-Aqsa mosque compound.

The site is holy to both Muslims and Jews, who refer to it as the Temple Mount. It is central to the Israeli-Palestinian conflict, with Palestinians fearing that Israel may one day seek to assert further control over it. It is located in east Jerusalem, occupied by Israel in 1967 and later annexed.

On Sunday, a 39-year-old Palestinian who saw himself as a protector of Al-Aqsa went on a shooting spree in Jerusalem, killing two Israelis.

The attacker, Misbah Abu Sbeih, who was reportedly scheduled to begin a prison term on the same day, was killed by police after he fled into an east Jerusalem neighbourhood.

Hamas welcomed the attack and said Abu Sbeih was a member, but did not claim responsibility for it.

Overnight the army sealed off a sweet shop owned by members of his family, saying it was affiliated with Hamas, police said.

Meanwhile, Israeli authorities announced they had arrested a Palestinian, Mohamed Joulani, last month on suspicion of planning a suicide attack on a bus in Pisgat Zeev, an Israeli settlement in east Jerusalem, on behalf of Hamas.

In addition, the army said it had demolished the West Bank home of a Palestinian sentenced to life in prison for the shooting deaths of an Israeli couple in front of their children a year ago.

The home of Amjad Aliwi, an apartment on the third floor of a building in the West Bank city of Nablus, was destroyed overnight with explosives, Palestinian police said.

The Israeli army says Aliwi was part of a Hamas cell responsible for planning and carrying out the October 1, 2015 attack on the settler couple in the West Bank.

The army also accused him of buying the gun that was used to kill them. Israel regularly demolishes the homes of attackers in a bid to deter violence.

Palestinians and human rights groups say the measure amounts to collective punishment since family members are forced to suffer for the acts of others.