Israeli authorities who have faced a wave of lone-wolf attacks by Palestinian Arabs say they have made progress in identifying potential assailants in advance, a challenge now also confronting Western nations.
Recent attacks in Europe and the United States have brought renewed attention to lone assailants and what can be done to stop them or reduce their impact.
While the challenge of halting such assaults can seem next to impossible, Israeli officials say an alert system incorporating social media monitoring, basic human intelligence and other means has helped prevent or limit bloodshed.
Analysts say that such efforts will always be limited, however.
Israeli officials nonetheless say methods developed since October have proved useful.
"We understand that once we assembled three or four profiles, most of the attackers were inside those specific lines of those profiles," a senior Israeli military official said, speaking on condition of anonymity.
Israel's military has developed an alert system that flags up those seen as potentially dangerous, the official said.
It is based on analyses of assailants since October, including their backgrounds, where they chose to act and their activities in the days before an attack.
With the list of names narrowed, Israeli authorities decide how to address the situation.
The response can include a range of strategies, such as monitoring, speaking to someone's parents or an arrest if the person is found to have broken the law by inciting violence, the official said.
Security measures were also tightened in areas seen as potential targets.
The number of attacks overall has steadily declined in recent months, although various factors are believed to be behind this.
Israeli authorities say it is difficult to give figures on how many lone-wolf attacks have been prevented by their efforts, but the military official pointed to one case as an example.
In March, a Palestinian girl, reportedly 17, was caught and arrested with a knife in a taxi on her way to an Israeli checkpoint, the official said.
The official said the girl had trouble with her parents and was suicidal, possibly wanting to attack soldiers as a way of dying as a martyr.
"It was one of the reasons we tracked her," the official said.
The military's analysis of attackers shows that most have been 24 or younger, and some 90 percent were male, the official said.
Among the first 80 to 90 attackers from October to January, suicide was among the motives for around 40 percent, the official said.
‘Terror wave can’t be stopped completely’
Some experts say the type of analyses and follow-up being done by the Israeli military, with the help of algorithms to narrow down social media chatter, can have an effect and be applied elsewhere.
"It can't of course completely stop this wave of terror in Israel and the same in other places -- in Europe for example," said Daniel Cohen, an expert on cyber-terrorism at Israel's Institute for National Security Studies.
Such efforts must also be accompanied by what he called "counter-narrative campaigns", or positive messages that try to convince young people that they should not want to die or carry out an attack.
Such campaigns could be related to economic opportunities or sports, Cohen said.
Others caution over putting too much faith in monitoring.
"Watch-lists and monitoring instil a false sense of security, providing authorities with information after a terror attack occurs, but little deterrence or disruption prior to an attack," US-based security consultancy The Soufan Group said in comments after jihadists killed an elderly priest in France on Tuesday.
"Surveillance is extremely difficult and costly in terms of time and personnel, and is only a feasible option in a fraction of France's growing terror caseload."
AFP contributed to this report