At least 40 Palestinians have been arrested by Israeli forces in the occupied West Bank, including Hamas supporters.

A Hamas official in the occupied West Bank says Israeli forces have arrested dozens of Hamas supporters, including legislators, in overnight raids.

Palestinian media also reported on Friday that scores of Palestinians, including two legislators, have been arrested across the West Bank in overnight raids.

The Israeli military said it arrested 40 people and alleged 37 of them are linked to Hamas.

The arrests come as four Palestinians have been killed by Israeli forces in separate operations over the past 24 hours, with the Israeli army declaring the city of Ramallah a closed military zone, as it carried out searches around the roads entering and exiting the city.

The closure was announced following a shooting attack near the illegal Israeli settlement of Ofra east of Ramallah. Two Israeli soldiers were killed by an unknown Palestinian.

After yesterday's shooting attack in which 2 IDF soldiers were killed & others were injured, IDF & other security forces apprehended 40 suspects wanted for involvement in terror. 37 of them are known Hamas operatives.

The IDF will continue to thwart terror & preserve security. pic.twitter.com/3nQdzyV1I7 — Israel Defense Forces (@IDF) December 14, 2018

Speaking from Ramallah, Al Jazeera’s Natasha Ghoneim said that most of the entry points into the city are now open.

“There’s an increased presence of Israeli soldiers on the outskirts of Ramallah and at the checkpoints,” she said.

The Hamas official said that some 70 members have been arrested throughout the week. The official spoke on condition of anonymity fearing arrest by Israel.

The Hamas movement, which governs the besieged Gaza Strip, saluted the shooting on Thursday and in a statement said it proved “resistance” was still alive in the West Bank.

“The flame of resistance in the West Bank will remain alive until the Israeli occupation is defeated from the entirety of our land, and we regain our full rights,” Hamas said.

According to Ghoneim, Palestinian Authority President Mahmoud Abbas has condemned the “overall violence”.

“But he also said that the stalled peace talks, the ongoing Israeli raids in the West Bank, and the settlers’ call for his assassination have created an unstable atmosphere conducive to this violence,” Ghoneim said.

Israeli Prime Minister Benjamin Netanyahu vowed on Thursday to legalise thousands of Jewish settlement homes in the West Bank that were built without Israeli permits.

Settlements are considered a violation of international law.

He also vowed to expedite the demolition of Palestinian attackers’ homes, increase detentions of Hamas members already in Israeli prisons and beef up Israeli forces in the area.

A total of 56 Palestinians across the West Bank and occupied East Jerusalem were also arrested by the Israeli army early on Thursday morning.

In the aftermath of the overnight killings, dozens of Israeli settlers attacked Palestinian vehicles with rocks on the busy Route 60 highway, south of Nablus.

The Israeli army frequently carries out wide-ranging arrest campaigns across the West Bank on the pretext of searching for “wanted” Palestinians.

According to Palestinian figures, some 6,000 Palestinians continue to languish in Israeli detention facilities, including scores of women and hundreds of minors.