Tens of thousands of people have gathered in Norway's capital Oslo to sing a popular children's song that mass killer Anders Breivik says he hates.

About 40,000 people sang the 1970s song Children of the Rainbow near the courthouse where Breivik is being tried for the murder of 77 people last July.

Breivik says he considers the song to be a Marxist "brainwashing of Norwegian pupils".

But one of the demonstrators, Torbjorn Sandvik, says it is a song of unity.

"This song represents the opposite of everything he stands for," he said.

"Because this song represents getting people together, negotiate, make the world a better place."

The demonstrators braved rainy weather and waved roses as they sang the song, by Norwegian folk singer Lillebjoern Nilsen.

Its chorus goes: "Together, we will live, each sister and each brother, small children of the rainbow and a green Earth."

"We are the ones who are winning," Nilsen - a beloved, Willy Nelson-esque folk singer dressed in his trademark black and with a grey beard - told the crowd.

Inside the court, the 33-year-old accused right-wing extremist sat listening without showing emotion to powerful testimony from survivors of his bloodbath on the ninth day of his trial.

Breivik first set off a bomb near government offices in Oslo, killing eight people, before going to nearby Utoya island where he shot dead 69 people, mostly teens, attending a Labour Party youth camp.

While he has confessed to carrying out the twin attacks, he refuses to plead guilty, saying his attacks were "cruel but necessary" to stop the ruling Labour Party's "multicultural experiment" and the "Muslim invasion" of Norway and Europe.

Anne Helene Lund, a bubbly 24-year-old, described how the explosion hurled her out of the tower housing the prime minister's offices, where she had been working for the summer as a receptionist.

Seriously injured, she suffered massive memory loss: she said she remembers virtually nothing from the three years she spent studying politics and had been forced to start over with studies at secondary school level.

Her doctor father Jan Henrik Lund described the atrocious injuries his daughter had suffered, telling the court she had come "just millimetres from death" and pointing out that she had been nicknamed "the miracle girl" by her rescuers.

"It was like living the best and the worst at the same time," he said of the moment he had finally found his daughter at a hospital, in a coma, on the evening of July 22.

"It was fantastic to find her alive, but awful to see her so injured," he added through tears.

'Spitting out teeth'

Prosecutor Inga Bejer Engh and many spectators in the courtroom also fought back tears, but Breivik himself continued to stare straight ahead, apparently unaffected by the testimony.

Another survivor, Harald Foesker, a 67-year-old government employee who had been on vacation on July 22 but had stopped by his office to print some documents, told the court that his "face was ripped loose from his head" when the blast occurred.

"I was hanging there, and I was spitting out my teeth," he recalled.

After several big operations he has been able to return to work part-time.

"It is up to me to decide when I want to stop working. No-one else," said Mr Foesker, who has lost 80 per cent of his sight.

Breivik has previously insisted he is of sound mind, accusing a team of psychiatric experts of making things up to prove him insane.

If the court ultimately finds Breivik sane, he will face Norway's maximum 21-year prison sentence, but that term can be extended for as long as he is considered a threat to society.

If he is found criminally insane, however, he will be sent to a closed psychiatric care unit for treatment, a fate he has described as "worse than death".

Source: Agence France-Presse