Thousands of Israeli soldiers and border police fanned out across major cities and security forces began to erect checkpoints to close off Arab neighborhoods in Jerusalem on Wednesday to stem a wave of Palestinian attacks against Israelis.

Military officials say the use of hundreds of Israeli soldiers along highways and in residential areas is the first such deployment in more than a decade, since the second Palestinian uprising, or intifada, in the early 2000s.

Israeli troops are regularly deployed in the West Bank, in Golan Heights and along the Gaza perimeter fence, but not in the heart of Israeli cities.

Israel also began calling up 1,400 Border Police reservists who serve under police command.

Israeli forces began to move cement barricades onto the streets and position vehicles at the entrances of Palestinian neighborhoods in East Jerusalem.

Israeli and Palestinian human rights activists warned that strict closures, if fully implemented, would represent a violation of international law and collective punishment against a population for the acts of a violent few.

Palestinians constitute about a third of Jerusalem’s 800,000 residents. Almost all of them live in East Jerusalem, which is considered occupied territory by most of the world, though Israel disputes this.

By early evening, Israeli authorities were still allowing cars to pass through control points in and out of Arab East Jerusalem, although they had begun to inspect identifications of some young Palestinian men and look inside their vehicles.

In the occupied West Bank, Jewish settlers also began to close their towns and communities to Palestinian workers.

Prime Minister Benjamin Netanyahu and his security cabinet said the closures were part of a tough new strategy designed to counter a wave of Palestinian attacks that have left the country deeply shaken.

On Wednesday afternoon at the Damascus Gate into Jerusalem’s Old City, police said they shot and killed a Palestinian, dressed in military-style camouflage and carrying a folding knife, who lunged at an Israeli Border Police officer who had stopped him for a spot identification check. No Israelis were injured.

Later at rush hour, a 24-year-old Palestinian from East Jerusalem stabbed a 71-year-old woman boarding a bus at Jerusalem’s busy central bus station, police said. The bus driver quickly closed the door behind the victim; the assailant ran and was shot and killed by a special-forces police officer at the station.

Many of the recent attackers have come from Arab neighborhoods in East Jerusalem, which is why Israeli authorities say they want the closures.

Muslim and Jewish residents of Jerusalem said they were afraid to venture out Wednesday.

Palestinian residents of Jerusalem, especially men who work in restaurants, hotels and construction sites in West Jerusalem, said they worried they would be hounded by crowds of angry Jews and attacked.

Jewish Israelis feared that Palestinians with knives could leap onto city buses or ram their cars into crowded bus stops — as two sets of attackers did Tuesday.

Arab and Jewish parents were driving their children to school instead of letting them go alone — or keeping them home. Stores in the Old City were shuttered. Public celebrations of the Muslim New Year were canceled.

In the city center in West Jerusalem, which is predominantly used by Jews, Orit Levanon was picking up her three sons from school. Last week, the boys made their own way home, using public transportation. No more.

“The situation is very stressful,” Levanon said. “I bought the older boys two cans of pepper spray, just in case. I am not taking any chances.” The older sons are 14 and 15.

“I don’t know if the spray will really help,” she said. “It’s probably more psychological, but I feel better that they have it in their backpacks.”

In the Beit Hanina neighborhood of Arab East Jerusalem, Nafez al-Rajabi said he wasn’t taking any chances. “My children are staying home,” said the owner of al-Baik coffee roasters and distributors.

Rajabi, 40, also has a store near the Damascus Gate in the Old City. “I tell you, I have to be very cautious,” he said. “I don’t carry a bag. I don’t carry a jacket. If I make any kind of quote-unquote suspicious movements, I believe I can be killed” by Israeli forces.

Eight Israelis have been killed and dozens injured in the past two weeks. More than 30 Palestinians have been killed by Israelis, including the fatalities in Wednesday’s attacks.

The dead Palestinians include alleged assailants shot at attack scenes and others who were killed by live rounds in violent clashes with Israeli forces.

Palestinian authorities say that those killed in clashes generally posed no serious threat to Israeli forces. Israel says they were throwing stones or gasoline bombs.

Palestinians also say that some alleged attackers, even those holding knives, could have been arrested and not shot dead.

Israeli police spokesman Micky Rosenfeld said there were no plans to close holy sites in Jerusalem, but he noted that increased security measures will remain “as long as necessary.” In recent weeks, Israel has restricted access to al-Aqsa Mosque in the Old City.

Israel’s security cabinet on Wednesday announced that it would demolish the homes of some of the attackers and strip them of Jerusalem residency rights or Israeli citizenship, transferring them to the Palestinian Authority, which controls the West Bank.

Netanyahu visited a Border Police base in Jerusalem on Wednesday night. Speaking about the knife assaults, which he compared to suicide attacks, the prime minister told the troops: “I cannot tell you how long this will continue. There are people here who are willing to die.”

“We do not know how many will commit suicide,” he said, “but the number is not infinite, far from it.” Netanyahu called the police “human shields” protecting Israelis.

The cabinet also approved a recommendation by Public Security Minister Gilad Erdan not to return the bodies of Palestinian attackers, preventing families from burying them in accordance with Muslim traditions.

“The families of these terrorists have turned the funerals into further demonstrations of terror and incitement that allows for further violence,” Erdan said in a statement Wednesday. He also said he would widen the criteria for more Israelis to obtain gun licenses.

U.S. Secretary of State John F. Kerry said Tuesday that he would visit the region soon, an announcement that received mixed reaction in Israel after he linked the uptick in violence by Palestinians to an increase in Jewish settlement construction.

U.N. Secretary General Ban Ki-moon also said that Israel was making the situation worse, criticizing “excessive force” by Israeli security forces.

Sufian Taha in Jerusalem and Brian Murphy in Washington contributed to this report.

Read more:

Israeli gun owners rush to shooting ranges amid wave of attacks

Palestinians don’t hate Abbas, but they’re tired of him

Today’s coverage from Post correspondents around the world