HEBRON, West Bank — Not long ago, 20-year-old Akram Wuswus and his friends routinely posted online praise for Palestinians who stabbed Israelis and subsequently were killed by authorities.

The friends were among many young people who gravitated to an imposing checkpoint that separates Palestinian and Israeli sections of the West Bank city of Hebron.

The spot, marking the entrance to Shuhada Street from the Bab Al Zawiyeh neighborhood, was among several that attracted people who had resolved to carry out stabbing attacks on Israeli soldiers.

For several months, stabbings at Hebron checkpoints and elsewhere in the West Bank and Jerusalem flummoxed security experts because they were being carried out by individuals without ties to militant groups, yet who sometimes left behind a trail of social media posts.

About 200 Palestinians and 30 Israelis were killed in the violence since September,and some rioting spurred concern that the so-called lone wolf stabbings, shootings and car rammings would escalate into a popular intifada, or uprising.

But in recent weeks, amid a campaign in Palestinian schools and streets to discourage such attacks, a social media crackdown, increased confiscation of knives by the Israeli army and Palestinian security services and other measures, the number of knife attacks has declined, officials said.

Wuswus said he stopped praising the attacks after Israeli soldiers arrested him at home in November and he spent two weeks at the Etzion prison. He said he was fined $1,000, which his parents paid on his behalf.

“I don't want trouble from it,” said Wuswus, a student at the Open University in Hebron.

He said his experience also changed his friends' behavior. They too stopped sharing social media tributes to those killed in attacks.

“They all learned from my case,” he said.

Israeli security officials have quietly praised the efforts of Palestinian forces and those speaking against violence, while also crediting their own measures, such as a controversial policy of demolishing the homes of attackers.

“The Palestinian atmosphere in the streets has changed,” said one Israeli military officer who spoke on condition of anonymity.

Orit Perlov, an Israeli expert on Arab social media at the Institute for National Security Studies, a Tel Aviv University think tank, was among observers who said the spate of attacks did not seem to have a unifying goal.

The wave of stabbings was bound to lose steam because it had no political leadership behind it, said Kadoura Fares, a prominent member of Palestinian Authority President Mahmoud Abbas' Fatah party.

“The Palestinian national movement didn't lead this wave,” said Fares, head of the Palestinian Prisoners Club, a nongovernmental organization. “The Palestinian Authority is trying to calm things down.”

No one can know how long the drop in attacks will last: Fares warned that the absence of negotiations to create an independent Palestinian state contributes to the hopelessness and a political vacuum that could help spur a new outbreak of violence.

The West Bank has been under Israeli control since the 1967 Middle East war. Palestinians want to form an independent state in the West Bank and Gaza Strip, with east Jerusalem as their capital.

Hebron is a divided and religiously conservative city with an elaborate Israeli army presence to secure a few hundred Jewish settlers who live in the middle of hundreds of thousands of Palestinians.

At the edge of the city, Israel erected barriers blocking roads linking outlying villages to the city. Shuhada Street was declared a closed military zone by the Israeli army, limiting access to the area by outsiders.