Denmark's intelligence agency says a Palestinian man suspected of attempted murder for stabbing a policeman is behind an attack this year on a Swedish government minister.

The PET intelligence agency made the announcement in a statement Wednesday that its Swedish counterpart confirmed, adding that the suspect earlier had threatened a policeman in Denmark.

PET said he may have sympathies for Islamic extremists in Syria, and could "be mentally unstable."

The agency said the man sprayed Swedish Justice Minister Morgan Johansson with a fire extinguisher during a visit to a Swedish asylum-seeker center. While Johansson wasn't harmed, the man was detained and later released.

On Wednesday, the suspect was ordered to remain in custody for three weeks after seriously injuring a policeman on Tuesday at Center Sandholm, Denmark's largest asylum center.