Anders Behring Breivik, who killed 77 people in Norway, said on Monday his massacre was necessary to prevent his country's cultural destruction.

We in the Norwegian movement will not sit and see that we are made a minority in our own country, the anti-Islam fanatic told a packed courtroom in only his second public comments since the attack in July.

The attacks on the government headquarters were preventive attacks on people committing cultural destruction of Norwegian culture and Norwegian ethnicity, he said and demanded to be released immediately.

The 32-year-old has admitted detonating a fertiliser bomb that killed eight people at a government building in Oslo in July and hours later committing a shooting spree at an island camp for the Labour Party youths, killing 69.

I acknowledge the acts but I plead not guilty, said Breivik, whose attacks were the worst outburst of violence in Norway since World War Two.

The custody hearing, required periodically to keep a suspect detained, was Breivik's fifth and the second one open to the public as Norway prepares for his trial, set to begin on April 16.

He entered the courtroom with a faint smile, wearing a black suit with a silvery tie, and raised his arms to show off his cuffed hands.

In a manifesto posted online before the attacks, Breivik wrote that he was targeting traitors whose leftist views and softness on immigration had brought the country low.

The ethnic Norwegians will be a minority in Oslo in the next 10 years. It is a fact. I represent Norwegian resistance, he told the court.

(Writing by Walter Gibbs; reporting by Gwladys Fouche)