The Israeli military partially closed off the main Palestinian city in the West Bank on Monday, sealing off roads out of the city intermittently after a nearby shooting the day before that wounded three soldiers.

Youths with toy guns attend the funeral of Ahmad Sharake who was shot during clashes with Israeli forces in Jelazun refugee camp, near Ramallah, West Bank. (Photo by Ilia Yefimovich/Getty Images)

Citing "situation assessments," the military said only residents of Ramallah could enter and only residents of other cities and humanitarian cases were allowed to leave until further notice.

Ramallah is the seat of the semi-autonomous Palestinian Authority and is a commercial center, drawing workers from around the West Bank. "Internal closures" were common during the Palestinian uprising that ended a decade ago, but have been rarely used in recent years.

The move came a day after a Palestinian policeman who served as a bodyguard for the Palestinian attorney general opened fire at a checkpoint near the city, wounding three soldiers.

Despite the measure, a row of about 100 cars queued at a checkpoint that was closed in the morning could be seen streaming through, and a main road out of the city, which had earlier been closed, was later opened.

Palestinians said the partial closure was collective punishment for the act of one individual.

"They shouldn't punish the entire governorate of Ramallah for a policeman who carried out an attack," said Palestinian police spokesman Adnan Damiri.

Israel has struggled to contain a wave of near-daily Palestinian attacks, which began in Jerusalem in mid-September and later spread to the West Bank and cities across Israel. It has beefed up security, sending troops to patrol its cities and erecting checkpoints in Arab areas of east Jerusalem.

The wave of violence has claimed the lives of 26 Israelis and one American student.

At least 151 Palestinians have been killed by Israeli fire, including 106 who were said by Israel to have been attackers.

The rest have been killed in clashes with Israeli troops.
Israel says the violence is fueled by a Palestinian campaign of lies and incitement.

The Palestinians say it is the result of frustrations rooted in nearly 50 years of life under Israeli occupation.

In the latest violence Monday, the military said a Palestinian attempting to cross the West Bank separation barrier drew a knife when soldiers approached him.

The troops opened fire, killing the Palestinian.

(© 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed)