Around the same time Mr. Brathen entered the mosque in 2015, Norway’s Police Security Service learned that he had converted to Islam and that he appeared to pose a threat, according to a spokesman for the security service, Martin Berntsen.
In 2017, federal agents became alarmed after Mr. Brathen posted a video on YouTube in which he said he was a “messenger.” The next year they warned the district psychiatric center that Mr. Brathen’s mental state “lowered his threshold for violence,” Mr. Berntsen said.
According to local officials, Mr. Brathen underwent psychiatric examinations in 2010 and 2018.
The Kongsberg district psychiatric center, where Mr. Brathen was treated at least once, said in a statement that it was working to “turn every stone to get to the bottom of what has happened, what our role has been and whether there is anything we could have done better.”
Last year, a judge imposed a six-month restraining order on Mr. Brathen at his parents’ request after he refused to leave their house, threatened to kill his father and left a revolver on their sofa.
Silje Limstrand, 22, and Gudoon Hersi, 21, were roommates who lived across the street from Mr. Brathen until two weeks ago. They described him as a brooding, unstable presence who often kept to himself and whose behavior grew more disturbing over time.