Swedish police said on Sunday that the suspect in the Stockholm truck attack was known to have expressed sympathies with extremist organisations, including Islamic state.

Police also said that the suspect had sought and been denied permanent residency in the Nordic country and was wanted for deportation.

"We know that he showed sympathies for extremist organisations, among them IS," police official Jonas Hysing told a news conference.

Meanwhile, Swedish police have arrested a second person in relation to the deadly truck attack in the capital and a court has appointed the person a legal representative, a court official said on Sunday.