(CNN) -- A man set himself on fire Tuesday outside the court in Norway's capital, Oslo, where Anders Behring Breivik is on trial over terrorist attacks last summer that killed 77 people.
"We don't know much about his motives, but he set himself alight outside the courthouse. Police were quick to put the fire out, and he has now been taken to hospital," Unni Groendal, head of media for Oslo police, told CNN.
Police said in a statement released later Tuesday that the man was a Norwegian citizen from a foreign background.
He has severe injuries, but they are not life-threatening, the statement said. He is expected to have surgery early Wednesday.
"It is still unclear what the motive was for his action. He can currently not be questioned by police," the statement reads.
A police spokesman earlier dismissed reports that the man had tried to force his way through the cordon outside the district courthouse.
Norwegian daily newspaper VG reported that several court employees ran out with water bottles to pour water over the man.
Video posted on the VG website shows the man running toward the court building with his hat and jacket on fire. Police officers then pull off his clothing and try to extinguish the flames as he lies on the ground.
He was given first aid treatment on site.
The incident happened about 1:45 p.m. local time (7:45 a.m. ET), according to Norwegian TV channel TV2.
Breivik is on trial on charges of voluntary homicide and committing acts of terror in the July 22 attacks. He admits carrying out an attack on a youth camp on Utoya Island and a bombing in Oslo that killed eight people.
He boasts of being an ultranationalist who killed his victims to fight multiculturalism in Norway.
Experts' assessment of Breivik's sanity will be a factor in determining what punishment he receives if convicted. Sentencing options could include imprisonment or confining him to a mental facility.
Friday's court session was disrupted when the brother of one of those killed threw a shoe toward Breivik, hitting one of his defense lawyers.
This week, the court is hearing testimony from some of those injured during Breivik's gun rampage on Utoya Island.
CNN's Per Nyberg contributed to this report.