A Danish court has sentenced a Russian-born man to psychiatric care and eventual deportation after he was found guilty of threatening to commit acts of terror by killing members of the Danish government.

The Frederiksberg Court in Copenhagen says the 32-year-old man, who was not identified, was found guilty for making several threats in 2014 and 2015 on Facebook. The threats were sent to Danish Prime Minister Lars Loekke Rasmussen and Integration Minister Inger Stoejberg.

The court said Wednesday the perpetrator, who was convicted for making similar threats in 2006, had been diagnosed with schizophrenia.

Prosecutor Anders Larsson said investigators found material on the man's computer that praised al-Qaida and the Islamic State group. Defense lawyer Peter Hjoerne has expressed doubts about his deportation because the man is stateless.