A Swedish court on Tuesday found a man guilty of murdering a woman and of planning to kill a senior politician at a festival in July, and ordered that he be taken into psychiatric care.
The 33-year-old Swede was arrested on the Baltic Sea island of Gotland moments after he had stabbed to death a prominent psychiatrist in a crowded square during Sweden's annual Almedalen Week political festival.
The murder took place close to where Centre Party leader Annie Loof had been due to hold a news conference.
The Gotland district court said the killer, Theodor Engstrom, had mapped Loof's agenda and was planning to murder her. It said this amounted to preparation of a terrorist crime.
"Sweden could have been hurt in a serious way if the crime had been carried out. The 33-year-old has said his intention was to hit back at the Swedish population," Judge Per Sundberg told a news conference.
Engstrom pleaded guilty to murdering the psychiatrist Ing-Marie Wieselgren, but rejected charges related to Loof.
He was assessed as having had a serious mental disorder at the time of the attack.
(Reporting by Anna Ringstrom, editing by Terje Solsvik and Crispian Balmer)