LARVIK, Norway — As a boy, the Somali immigrant sold newspapers door to door in this peaceful seaside Norwegian town and told neighbors he was going to be a doctor and help people in Africa.

In high school, he began taking a prayer rug to school, but in a community with many Somalis — not to mention Muslims from Libya, Chechnya and elsewhere — he hardly stood out. He rarely got into even mild trouble.

But with grades that fell short of medical school requirements, the young man, Hassan Abdi Dhuhulow, struggled to find a job after high school and began visiting radical jihadist Web sites. In 2009, he took the first of several long trips back to Somalia.

Norwegian investigators now want to know whether the boy who wanted to be a healer grew up to be a killer. They are questioning relatives and friends of Mr. Dhuhulow, 23, to try to determine whether he was one of the four attackers caught on surveillance cameras during the rampage at the Westgate shopping mall in Nairobi, Kenya, last month, when more than 60 men, women and children were killed.