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.”