FREDRIKSTAD, Norway — The real trouble started when they stopped causing trouble. Torleif Sanchez Hammer and his friends — all residents of the same small cluster of clapboard houses in southern Norway — had been having run-ins with the police for years but then suddenly halted their marijuana-fueled gatherings in the basement apartment of Mr. Hammer’s widowed mother.

Police officers in this placid Norwegian town had busted their marijuana parties so regularly that “we knew them all on a first-name basis,” recalled Ragnar Foss, head of a local police unit responsible for youth crime. But, two years ago, they cleaned up their act. “We wondered what had happened but were glad when they dropped off our radar,” Mr. Foss said.

One by one over the following months, Mr. Hammer and at least seven other young men who lived on or around just one street, Lislebyveien, made their way to Syria to wage jihad alongside the Islamic State and other militant groups.

As Europe tries to fathom such journeys by its young Muslims, politicians and scholars have variously blamed the influence of the Internet and radical mosques, or sources of despair like discrimination and unemployment.

But the subterranean currents that pushed so many young men to Syria from Lisleby, a Fredrikstad district of just 6,000, stand out as an example of a phenomenon none of those theories can explain: Why it is that certain towns, and even small areas within them, generate a disproportionate number of jihadists?

It “is a big puzzle,” said Jon Fitje Hoffman, director of strategic analysis at Norway’s domestic intelligence agency, the Police Security Service, known as PST. It is also one that has flummoxed security services from Denmark to Germany to France.

In interviews, the families of those who traveled to Syria, other residents and local officials described an unsettling and relatively sudden turn for a clutch of youths, apparently impressed by the example of a popular local soccer player, Abdullah Chaib. Beneath an alluring image as a personable and handsome local hero, he harbored a deep commitment to jihad and was among the first to go.

Aside from living just a short walk from one another, all those who followed from Fredrikstad had little in common, coming from different ethnic, socio-economic and even religious backgrounds.

With its pleasant rows of wooden houses on green lawns behind neat fences and hedges, the town is orderly, clean and safe, fronted by a picturesque harbor. While not prosperous by Norwegian standards, it is no landscape of urban blight.

Not all of the young men came from troubled families or were disadvantaged. Perhaps the most determining factor in their decisions to go to Syria was their influence on one another.

Image

Police officers at the school attended by Torleif Sanchez Hammer, who went to wage jihad in Syria.CreditBryan Denton for The New York Times

The soccer player, Mr. Chaib, “was the central figure,” recalled Yousef Bartho Assidiq, a native Norwegian convert to Islam who visited Fredrikstad several times along with members of Prophet’s Umma, a radical group from Oslo that openly supports the Islamic State.

Mr. Assidiq, who has since broken with Prophet’s Umma and runs a small organization that works to counter radicalization, recalled that he had been “really shocked” when Mr. Chaib started talking to him in private about jihad in Chechnya, Afghanistan and Syria. “He was a real fanatic,” he added. “He talked about jihad all the time.”

In November 2012, Mr. Chaib, who was of Algerian descent and then 23, traveled to Syria, ostensibly for humanitarian work, and was killed the following month.

Tributes flooded a memorial page on Facebook — and youths in the Fredrikstad district of Lisleby, six of whom went to Mr. Chaib’s old high school, began making their way to Syria. “Rest in peace our beautiful angel, Abdullah Chaib,” read one Facebook tribute.

Mr. Chaib’s death, according to a fellow soccer player who spoke on the condition of anonymity to avoid retribution from radicals, only enhanced his reputation and set an example of heroic sacrifice that others wanted to follow.

“It was contagious,” he said, comparing Mr. Chaib’s support for jihad to the skill of a “strong soccer player who does something good on the field and makes all the other players want to do even better.”

A spokesman for Norway’s Police Security Service, Trond Hugubakken, said investigators were looking into what or who prompted the abrupt embrace of militant Islam, focusing on the possibility of recruiters from outside the neighborhood.

He said it was not yet known exactly who these might have been in Fredrikstad but added that the Prophet’s Umma outfit had long been on the security service radar.

Mr. Foss, the local police officer, said he first noticed Prophet’s Umma when a Fredrikstad mother filed a complaint that activists from the group were pestering her mentally disturbed son, trying to persuade him to go to Syria. He did not go and is now in a mental hospital.

Those who did go, he added, had shown no previous interest in Islam. “None of them ever even mentioned religion when we knew them,” said Mr. Foss, sitting in an office piled with confiscated water pipes and other drug paraphernalia.

“The only thing they had in common is that they did not function in society,” he added. “But they wanted to be able to do something, to be good at something.” Radical Islam, he said, “offers a whole package.”

“It is ready and all you have to do is accept it,” Mr. Foss said.

Out of place and searching for purpose, Mr. Hammer and his friends did so with gusto. He converted to Islam — after being raised Roman Catholic — and changed his first name from Torleif to Abdul.

“He was reading, reading, reading all the time,” his mother, Rebecca, an immigrant from the Philippines, said, waving a copy of the Quran she found in her son’s bedroom, along with his prayer beads, a knitted skull cap and an electronic device that recites Islamic prayers.

“He said he wanted to fix himself after too much disco, too many girlfriends and too much smoking,” she said.

Mr. Hammer first popped up in police reports when he started stealing Mercedes-Benz hood ornaments as a young teenager. In his zeal to change course, he suddenly started spending hours each day at Lisleby’s only mosque, annoying worshipers, mostly immigrants from Somalia, with self-righteous lectures on how to pray properly.

The mosque leadership finally asked him to leave.

“He has only been a Muslim for two years and I have been a Muslim my whole life,” Warsame Mohamed Saleban, a director of the Lisleby mosque, said.

Also attracted by the certainties and a sense of superiority offered by radical Islam was Samiulla Khan, who lived just down the road from Mr. Hammer and often attended his basement parties. He also went to the school attended by the soccer star, Mr. Chaib, a mixed vocational and regular high school called Greaker.

The son of immigrants from Pakistan, Mr. Khan, according to people who knew the family, felt out of place not only among Norwegians but also among fellow Pakistanis. His father, a convicted murderer, brought further shame on the family after his release from jail by killing a woman while driving drunk. The father declined to comment.

Another schoolmate of Mr. Chaib’s was Abu Edelbijev, whose family had emigrated to Norway to escape the war in Chechnya in 2002.

A keen athlete and bodybuilder, Mr. Edelbijev complained a lot about Russian brutality in Chechnya and Israeli treatment of Palestinians. But he liked and felt loyal to Norway, whose military he wanted to serve but was unable to join because of a bad eye, according to family members.

He used to pray regularly at the local mosque but, after Mr. Chaib’s death, mostly avoided the mosque and began spending more and more time in Oslo, they said. Where he went in Oslo is not known, but the city has a number of mosques and meeting places frequented by activists from Prophet’s Umma and other radical groups.

After one of his visits there in 2013, his mother discovered three new iPhones stashed in his bedroom. She did not make much of this at the time but now thinks the phones were part of preparations for travel by himself and others to Syria. He also borrowed money to buy a Mercedes, the car he would later use to drive across Europe into Turkey and then to the border with Syria.

Image

The mother of Abu Edelbijev, who was killed fighting in Kobani.CreditBryan Denton for The New York Times

In August 2013, while his parents were on vacation in Tunisia, he sent them a text message: “Please don’t try to find me. I have made my choice.” He was on his way to Syria.

Before his departure, Mr. Edelbijev hectored Mr. Hammer, who lived a short walk away, and his friends about their marijuana habit and their failure to observe the teachings of Islam.

Mr. Foss, the police officer, said the lectures seemed to have an impact as Mr. Hammer stopped hosting drug parties. He said he picked up reports that Mr. Hammer and his dropout friends were suddenly showing a curious enthusiasm for religion and reported this to the PST, the security agency.

Their sudden fervor, he said, struck him as odd but did not stir great concern. “When they disappeared from our radar we thought: ‘Oh, that’s good.’ ”

Like Mr. Edelbijev, Mr. Hammer also started taking trips to Oslo, telling his mother that he was going to learn more about Islam. She did not understand his sudden zeal but was happy that it seemed to calm his wilder side.

In December 2013, Mr. Hammer informed his mother that he was going on vacation in Greece. “I have to take a vacation, Mama. I have no friends, no job, nothing,” his mother recalled him saying. He then disappeared, announcing several months later that he was in Syria. A photograph posted on Facebook showed him dressed in camouflage, his hair covered by a black bandanna, and carrying a gun.

Three of the others who went to Syria from Lisleby have already been reported dead. Two have returned safely to Norway: Mr. Khan, 24, who left Syria after being wounded in the leg and is now in custody in Oslo awaiting trial on charges of membership in a terrorist organization, and a Kurdish-Norwegian around the same age, who is now in hiding.

Mr. Edelbijev, the Chechen, initially assured his family that all was well, though his parents had doubts when he sent them a photograph from Syria that showed him looking gaunt and ill-fed.

Late last year he found himself in the thick of fighting after the Islamic State sent him to join forces besieging Kobani, a mostly Kurdish town on the border with Turkey. Apparently expecting to die, in November he posted a farewell message in Norwegian on Facebook: “Take care and good luck in life, my brothers. I love you. God willing, I will see you in the next world.”

He was killed a few days later. His family learned of his death from his new 18-year-old wife, a woman from the Russian region of Dagestan whom he had met in Syria. Four months pregnant, the wife, Diana Ramazanova, began making arrangements to leave Syria and travel to Fredrikstad to give birth.

She made it as far as Istanbul, Turkey. There, on Jan. 6, she blew herself up in a suicide attack on a Turkish police post, killing a police officer and her own unborn baby.

Correction:

An article last Sunday about a town in Norway from which eight men have traveled to Syria to fight alongside the Islamic State and other militant groups misspelled the name of the town. It is Fredrikstad, not Frederikstad. The error was repeated in the dateline, in a picture caption and on a map. The article also misidentified the capital of Turkey. It is Ankara, not Istanbul. And because of an editing error, a reporting credit was omitted. Henrik Pryser Libell contributed from Oslo.

Henrik Pryser Libell contributed reporting from Oslo.

A version of this article appears in print on , on Page A1 of the New York edition with the headline: A Norway Town and Its Pipeline to Jihad in Syria. Order Reprints | Today’s Paper | Subscribe