LONDON— In the United States, two Chechen immigrants are accused of the Boston Marathon bombings. In Canada, a doctoral student at a Montreal university is one of two non-citizens accused this week of plotting to derail a passenger train.

The headlines in North America in the past week echo an issue that authorities have been grappling with for more than a decade: why do a tiny minority of men in immigrant communities in the West appear to be drawn to Islamist violence.

In many cases, the motives need to be sought as much in psychology or sociology as in politics or religion, said Raffaello Pantucci, a counter-terrorism specialist at London's Royal United Services Institute (RUSI) security think tank.

"It's a complicated mix of reasons, usually as much personal as they are transnational or global," he said.

Young men could become vulnerable if they felt they were not advancing in society, or wanted to do something for their community and found a misguided means of doing so.

"The broad conclusions are that they tend to be under a certain age [40s] and are Muslim males, though none of these are hard and fast rules - we have seen women involved and very recent converts. There is usually some kind of outside contact that pushes them along in the process," Pantucci said.

Some may have come into contact with radical Islamists on trips abroad, a possibility investigators are exploring in the case of the elder of the two Chechen brothers - 26-year-old Tamerlan Tsarnaev, killed in a firefight with police.

Some fit the description given to his younger brother, 19-year-old Dzhokhar Tsarnaev, well-liked and hard for those who knew him to imagine turning to violence.

Take Omar Sheikh, for example, one of the earlier British men drawn into global jihad. As a schoolboy in north London, he loved to arm-wrestle in smoky pubs - drinking only milk - or play chess with friends. The son of a clothes' merchant who had spent part of his school years in Pakistan, he was obsessed with academic success and dreamed of going to Harvard.

"Omar was very likeable in lots of ways. When he was younger, he had this very roguish charm and was full of adventure," said Daniel Flynn who was in his class at school.

"He wouldn't often fight but when he did, he would fight to stick up for other people. If any of the younger boys were being bullied, he would stand up for them," said Flynn, now a Reuters journalist.

Many years later, Omar Sheikh, now in jail in Pakistan, became infamous after he was convicted of involvement in the kidnapping and murder of Wall Street Journal correspondent Daniel Pearl in Karachi in 2002.

Then there was 23-year-old French-Algerian Mohammed Merah, who shot dead seven people in France last year before being killed by police. He came from a broken home in the poor suburbs and a background of petty crime, and preferred to visit nightclubs than going to the mosque.

He was initially described as a "lone wolf," but French police later said he had travelled to Afghanistan and Pakistan and had been interviewed by intelligence officials after a 2010 complaint for showing a young boy a video of beheadings.

"We don't have the capability to watch all of them," France's top anti-terrorist judge Marc Trevidic told Reuters earlier this year. "We accept that there are 4,000 deaths on the road every year, that there are serial killers... It's really the only form of criminality where 100 percent success, 100 percent prevention, is demanded."

More recently, three men from the English city of Birmingham were convicted in February of plotting attacks which prosecutors said would have been the biggest since the July 7, 2007 London transport bombings which killed 52 people.

Young British Pakistanis, they had been influenced by the American-Yemeni preacher Anwar al-Awlaki, killed by a U.S. drone attack in Yemen in 2011, and by the magazine he created, Inspire. The men were recorded discussing some of the plots mentioned in the magazine, including the idea of driving a harvester machine re-fitted with swords or blades into a crowd.

Like some of the London transport bombers, they had travelled to Pakistan for training. But unlike the four suicide bombers in London, they had little support once they returned home - al-Qaeda, according to Western intelligence officials, has lost its capacity to provide direction from a distance.

And then there are those who seem to have no direction at all, like 25-year-old ethnic Chechen Lors Doukaev, a Belgian citizen, who accidentally blew himself up in a toilet in Copenhagen while preparing a bomb. He was convicted by a Danish court in 2011 of plotting an attack on the daily Jyllands-Posten whose caricatures of the Prophet Mohammed sparked violent protests in the Middle East, Africa and Asia in 2006.

From ethnic conflict to gobal jihad

U.S. and European security agencies have been worrying for years about their citizens from immigrant communities travelling overseas, possibly coming into contact with frontline militant Islamist groups in their ancestral homelands.

Some from the large British Pakistani community were drawn initially to Pakistan-based groups focused on the Kashmir dispute with India, before crossing over into the orbit of al Qaeda with its more global anti-western ideology. To those studying it, the route became known as "the Kashmir escalator."

A flagship U.K. program to counter radicalisation failed to achieve its objectives, so much so that in 2010 British lawmakers said the policy had alienated those it was supposed to be winning over.

The Tsarnaev brothers would have been brought up in the shadow of the two wars their Chechen people fought against Russia in the 1990s, and were exposed to the spread of hard-line Islam in southern Russia since then.

"Early indications suggest a young member of a diaspora, Tamerlan Tsarnaev, disaffected, unable to fit in and unhappy with his life, who sought comfort and an explanation for his perceived troubles in an extreme and extremely over-simplistic ideology," said Stephen Tankel, a scholar at the Carnegie Endowment in the South Asia Program and author of a book on the Pakistan-based Lashkar-e-Taiba militant group.

"That ideology explained not only his unhappiness and perceived failures here in America in a way that gave him someone else to blame, but also connected him to those suffering in what for him was a, probably mythologised, homeland as well as to a wider community. If so we've seen that before."

If Western countries have gained experience in disrupting plots - through intelligence cooperation and domestic surveillance and policing - they have got little better at challenging the narrative which leads young men into jihad.

Big, complicated attacks may be more difficult for militant groups to organise, but al-Qaeda is encouraging like-minded people to conceive their own smaller-scale plots.

"There is no doubt the big sophisticated 9/11 type plot, 7/7 type plots, are much harder to organise," Stuart Osborne, Britain's Senior National Coordinator for Counter Terrorism, said last month. But he added that, "it would be fair to say that some of the al Qaeda leadership have sort of said: 'That's good if you can do it, but if not, any attack, whatever you can, at whatever size is useful.'"

A new generation is growing up, disconnected at home by urbanisation and in the diaspora by immigration, from its familial, ethnic, tribal or linguistic identity, but unable to identify with a westernised, irreligious elite, said Huma Yusuf, a Pakistani columnist for Dawn newspaper who has studied in the United States and lives in London.

"This generation has conservative values, and a deep experience of inequality and lack of identity that has not found political expression except through the narratives of extremist groups," she said.

"Instead of seeing the emergence of a new urban, middle-class political movement that simultaneously acknowledges 'Islamic values' and embraces modernity, globalization, and emphasizes middle-class aspirations, we're seeing new political actors echo the 'clash of civilizations’ narratives and isolationist posturing of extremist groups."

The wars in Afghanistan and Iraq may also have accelerated an already existing problem, said Pantucci.

"The post-9/11 wars maybe made it easier to persuade people that the narrative really was not only that the West didn't care about Muslims, but was actively going around the world trying to kill them."

That assessment was borne out talking to activists in city of Birmingham. While they believed al-Qaeda was no longer relevant after U.S. forces killed Osama bin Laden in Pakistan in 2011, and stressed they themselves had no interest in violence, they also saw a need to stand up to a decadent and corrupt West.

"Al-Qaeda has been destroyed," said one young man, talking in a café in the inner-city suburb of Alum Rock. "This is not an Islamic struggle," he said. "It is a global struggle against corruption, imperialism and Zionism."