"We request that he is transferred to compulsory psychiatric care," prosecutor Svein Holden told the court in closing arguments.
Though there was inconclusive evidence that Breivik was psychotic during the July 22 attacks, there were enough doubts about his sanity that he cannot be sentenced to prison under Norwegian law, Holden said.
The defense is likely to rebut the insanity finding on Friday, the last day of the 10-week trial. Breivik, who styles himself as an anti-Muslim militant, claims he is sane and that his attacks were motivated by his political views.
Just like when the trial statred in mid-April, the 33-year-old Norwegian flashed a clenched-fist salute with his right arm before he was led out of the court Thursday.
Earlier in the trial, Breivik said the psychiatric dimension of the case was a way for Norwegian authorities to ridicule him and divert attention from his ideology.
Breivik claims Norway and Europe are being colonized by Muslims, who are about 2 percent of Norway's population. He has said he selected his targets - a government high-rise and a summer camp for the governing Labor Party's youth organization - to strike against the political forces he claims betrayed the country with liberal immigration policies.
Some of those who lost family members in the massacre were disappointed by the prosecutors' decision. "They say they want this to be a correct judgment," said Mette Yvonne Larsen, a lawyer for the bereaved. "They think that imprisonment would be a more justified outcome of what happened on July 22."
Two teams of psychiatrists reached opposite conclusions about Breivik's mental health. The first team diagnosed him with "paranoid schizophrenia," a serious mental illness which would preclude a prison sentence. The second team found him legally sane, saying he suffers from a dissocial and narcissistic personality disorder, but is not psychotic.
Prosecutors said one of the key challenges to Breivik's sanity was his insistence of belonging to a militant anti-Muslim modeled after the Knights Templar, a Christian military order during the crusades, even though investigators have found no trace of the network.
After the hearing Thursday, prosecutor Inga Bejer Engh stressed that a commitment to psychiatric care would mean that Breivik would be put away for a long time, maybe for the rest of his life.