Anders Behring Breivik was convicted on Friday of terrorism and premeditated murder for bomb and gun attacks that killed 77 people and sentenced to a special prison term that would allow authorities to keep him locked up for as long as he is considered dangerous. Breivik, a self-styled anti-Muslim militant, looked pleased as Judge Wenche Elisabeth Arntzen read the ruling, declaring him sane enough to be held criminally responsible for Norway’s worst peacetime attacks. Lawyers for the 33-year-old Norwegian said before the decision that Breivik would appeal any insanity ruling but accept a prison sentence. Going against the recommendation of prosecutors, who had asked for an insanity ruling, Arntzen imposed a sentence of “preventive detention,” a special prison term for criminals considered dangerous to society. She set the minimum length of imprisonment to 10 years and the maximum at 21 years, the longest allowed under Norwegian law. However, such sentences can be extended under Norwegian law as long as an inmate is considered dangerous.