A Norwegian court sentenced Anders Behring Breivik to prison on Friday, denying prosecutors the insanity ruling they hoped would show that his massacre of 77 people was the work of a madman, not part of an anti-Muslim crusade. Breivik smiled with apparent satisfaction when Judge Wenche Elisabeth Arntzen read the ruling, declaring him sane enough to be held criminally responsible and sentencing him to "preventive detention," which means it is unlikely he will ever be released, according to AP. The sentence brings a form of closure to Norway, which was shaken to its core by the bomb and gun attacks on July 22, 2011, because Breivik's lawyers said before the ruling that he would not appeal any ruling that did not declare him insane. Prosecutors had argued Breivik was crazy as he plotted his attacks to draw attention to a rambling "manifesto" that blamed Muslim immigration for the disintegration of European society. Breivik argued that authorities were trying to cast him as sick to cast doubt on his political views, and said during the trial that being sent to an insane asylum would be the worst thing that could happen to him. The five-judge panel in the Oslo district court convicted Breivik, 33, of terrorism and premeditated murder and ordered him imprisoned for a period between 10 and 21 years, the maximum allowed under Norwegian law. Such sentences can be extended as long as an inmate is considered too dangerous to be released, and legal experts say Breivik will almost certainly spend the rest of his life in prison. It was not clear whether prosecutors would appeal the ruling. If not, and if Breivik sticks to his word not to appeal a prison term, the legal process for one of the darkest chapters in Norwegian history will have come to a close. Some who lost loved ones in the attacks welcomed the ruling. -- SPA