Rioting spread across Stockholm's suburbs early Wednesday in the third night of unrest to hit the Swedish capital, as Prime Minister Fredrik Reinfeldt blamed the violence on "hooliganism" and appealed for calm.

"In the past 24 hours, around 30 cars have been set on fire... in the greater Stockholm area," said Kjell Lindgren, a spokesman for the Stockholm police.

A school and a nursery in two of Stockholm's most deprived areas had been torched, and rocks were thrown at firefighters, police officers and their vehicles, he said.

The unrest is believed to have been sparked the deadly police shooting last week of an elderly man.

In Husby, the suburb where the violence first broke out late Sunday, one man was arrested on suspicion of setting fire to an arts-and-crafts centre.

Reinfeldt on Wednesday said "everyone has to take responsibility for restoring calm."

"It's important to remember that burning your neighbour's car is not an example of freedom of speech, it's hooliganism," he told news agency TT.

Lindgren said that the latest riots had spread from northwestern to southern Stockholm.

On Tuesday, the prime minister waded into Sweden's heated debate on immigration by attributing some of the problems in Stockholm's low-income suburbs to failed integration.

"Sweden is a country that receives large groups from other countries. I'm proud of that," he said.

But he added that "there is often a transition period between different cultures" that the government had sought to facilitate by improving Swedish language education.

The anti-immigrant Sweden Democrats on Wednesday pounced on the issue, saying the riots were the result of an "irresponsible" immigration policy.

"Never before has so much money been spent on immigrant-heavy suburbs as today," party leader Jimmie Aakesson and spokesman Richard Jomshof said in the daily Svenska Dagbladet.

"In Husby the teacher-to-student ratio is extremely high, there are newly built libraries, and the youth centres have generous opening hours," they wrote.