On Friday, a Norwegian court must determine whether Anders Behring Breivik was sane when he killed 77 people last year. Court-appointed experts have come to opposing conclusions, but most Norwegians believe Breivik must have been mentally sound in order to plan such an attack.

This file photo shows Anders Behring Breivik, a right-wing extremist who confessed to a bombing and mass shooting that killed 77 people, arriving for a detention hearing at a court in Oslo, Norway. Breivik will receive his judgment Friday in a court room custom built for his trial.

OSLO — A Norwegian court delivers its verdict in the ten-week trial of gunman Anders Behring Breivik on Friday, deciding whether to send the anti-Muslim militant to jail or a mental hospital for the massacre of 77 people last summer.

Prosecutors have demanded a verdict of insanity, a fate Breivik called "worse than death", while many of his victims say only a sane person could have carried out such a complex attack. Either way he is likely to spend the rest of his life behind bars.

"He has made it clear that if he is convicted as legally insane, he will appeal the decision," Geir Lippestad, Breivik's defence lawyer, said on Thursday. "If he is convicted as sane, he will accept that."

Breivik detonated a fertilizer bomb outside a government building that included the prime ministerial offices last July, killing eight, then gunned down 69 people, mostly teenagers at the ruling Labour Party's youth camp on Utoeya island.

Guilt had never been a question in the trial as Breivik described in chilling detail how he hunted down his victims, some as young as 14.

The killings shook this nation of five million people which had prided itself as a safe haven from much of the world's troubles, raising questions about the prevalence of far right views as immigration rises.

The trial and a commission of investigation into the country's worst violence since World War Two have kept Breivik on the front pages for the past 13 months and survivors said the verdict would finally bring some closure.

"It has been a tough year... but I don't want to be Utoeya-Nicoline for the rest of my life," said Nicoline Bjerge Schie, a survivor of the shooting.

Whatever the five judges decide, Breivik will be locked up in solitary confinement inside the maximum security Ila prison on the outskirts of Oslo.

If found sane, Breivik will return to his relatively spacious cells, enjoying the comforts of a computer, newspapers and a separate exercise room.

Although the maximum sentence is 21 years, prisoners can be held indefinitely if deemed dangerous and few believe anyone would ever sign Breivik's release papers.

If declared insane, Breivik faces a regime of indefinite mental treatments inside a one-man mental ward set up for him in the prison and would come up for review every three years.

One team of court appointed psychiatrists concluded he was psychotic while another came to the opposite conclusion. To make the ruling more difficult, several other experts who testified described a series of mental conditions Breivik suffered from.

Still, polls show that around 70 percent of Norwegians think such a well-planned attack could not have been the work of a madman and Breivik must take responsibility rather than be dismissed as merely deranged.

Breivik himself argued for a verdict of sanity as he wants the attack to be seen as a political statement rather than an act of lunacy.

If Breivik appeals, he will be granted a new, possibly even longer trial sometime in January.