Norway's police chief has resigned days after an independent commission found that police could have prevented all or part of the attack by Anders Behring Breivik that killed 77 people.

The bombing of central Oslo and shooting spree at a youth camp shook the country, raising questions about the prevalence of far-right views and the efficiency of security services.

Police Chief Oeystein Maeland, who became the head of the police directorate weeks before the attack, has been criticised for failing to face up to police shortcomings afterwards.

Mr Maeland, a long-time Labour Party politician and the best man at Prime Minister Jens Stoltenberg's wedding, quit after losing the confidence of Justice Minister Grete Faremo and other politicians, he told news agency NTB.

The commission said intelligence services could have learned about Mr Breivik's plans months before the attack when he purchased bomb-making components.

It also said that police had enough information to stop him as he made his way from the bombing scene to the youth camp on Utoeya island.

Pressure has also been mounting on the ruling Labour government since Monday's report.

Still, the fallout on Mr Stoltenberg appeared limited, as 72% of voters think he does not need to resign over the report, a poll by public broadcaster NRK showed.

Mr Breivik, whose ten-week trial earlier this year gripped international attention, will be sentenced on 24 August.

Prosecutors have asked the five judges to declare him insane. Mr Breivik wants to be ruled sane and his attack considered a political statement rather than an act of lunacy.

Mr Breivik, who killed mostly teenagers, including some as young as 14, said his victims were fair targets because they were "brainwashed cultural Marxists" whose support for Muslim immigration threatened Norwegian ethnic purity.

If ruled insane, he faces indefinite mental care. If ruled sane, he would be sentenced to 21 years in prison with the possibility of indefinite extensions.