JERUSALEM — The Israeli military on Friday barred Palestinians who do not live in a particularly tense part of the West Bank city of Hebron from entering the area, and, according to local residents, the move prevented young men from visiting an Islamic shrine nearby.

The restrictions, which residents said were the most severe in over a decade, followed a spate of stabbings in and around Hebron in the past two weeks, including one in the Old City on Thursday that wounded a soldier.

Lt. Col. Peter Lerner, a military spokesman, declined to detail the new restrictions or say how long they would last. A military statement referred vaguely to “precautionary measures” taken “in order to contain potential attacks in the future and maintain the safety and well being of Israelis.”

A written order from Col. Yariv Ben Ezra, an Israeli commander in the area, provided by a Palestinian activist in the area, Issa Amro, indicated that anyone who did not live in a section of Hebron’s Old City controlled by the military or who did not have a special permit to enter would be blocked. “No one is to enter this area or sojourn into it,” the order said. “Anyone who is found in the closed zone will be obliged to leave it immediately.”

Three residents said Israeli officers went house to house on Friday in Palestinian areas near four Jewish settlements recording the identity cards of residents. Emad Abu Shamsiya, an activist who lives there, said he at first refused to cooperate but was told by an officer, “If your name isn’t on the checkpoint, you, your wife and your sons won’t be able to move.”

Mr. Abu Shamsiya said he had not witnessed anything similar since 2003, during the violent second intifada, or Palestinian uprising, when the Israeli military maintained strict curfews on six West Bank cities.

Mr. Amro, a leader of a local group, Youth Against Settlements, said the military also blocked Palestinian men aged 15 to 25 from praying Friday at the Hebron holy site known to Muslims as the Ibrahimi Mosque and to Jews as the Tomb of the Patriarchs. Similar age limits at Al Aqsa Mosque in Jerusalem were among the grievances that helped fuel the recent violence.

Israel’s decision to withhold the bodies of Palestinians shot dead after attacks or attempted attacks on Jews have also fanned the flames, particularly in Hebron, a culturally conservative city. Residents see the decision as an affront to the Muslim tradition of immediate burial. By Friday night, Israel had released the bodies of seven Palestinians, five of them from Hebron, which had been held for many days.

As families of the dead awaited the bodies on Friday night at an Israeli checkpoint, Hebron’s mayor, Daoud Zaatari, said, “I think that this is the least they can do at this critical time.”

Violence continued Friday after a month of attacks and clashes between Palestinians protesting Israel’s occupation of the West Bank and Israeli forces.

Local news outlets reported that an 8-month-old baby died after inhaling tear gas Israelis used to quell a demonstration near the baby’s home in Beit Fajjar, a village near Bethlehem. Wael Thatka, a journalist, said the family had told him the baby had a heart problem that appeared to have been worsened by the gas.

In Jerusalem, a security guard killed a Palestinian who the police said had stabbed and wounded an American citizen. Two other Palestinian men were shot, one fatally, after they apparently tried to stab Israeli police officers near Nablus, a West Bank city.

At a military checkpoint on the outskirts of Ramallah, in the West Bank, an Israeli police jeep hit a Palestinian demonstrator, and soldiers pushed away medics and photographers who rushed to the chaotic scene, according to video on news websites and social networks. Israeli news outlets said the demonstrator had been holding a broken bottle and appeared to have been trying to harm a border-police officer. Palestinians portrayed the episode as excessive force by Israel.

Rami Nazzal contributed reporting from Ramallah, West Bank.

A version of this article appears in print on , Section A, Page 6 of the New York edition with the headline: Israelis Restrict Entry to Parts of Hebron . Order Reprints | Today’s Paper | Subscribe