Police found indications that Theodor Engstrom, 33, had plans to murder Centre Party leader Annie Lööf.
A Swedish court has ruled that a man who killed a prominent psychiatrist on the island of Gotland in July is guilty of the woman's murder. He was also convicted of planning to kill a senior politician who was nearby at the time of the attack.
Theodor Engström, 33, was arrested only moments after 64-year-old Marie Wieselgren was stabbed to death at Sweden's annual Almedalen Week political festival in Visby on 6 July.
Prosecutors charged him with planning and carrying out a "terrorist" act, saying that the murder was designed to "instil grave fear among the population or part of the population". The court rejected this charge, but found Engström guilty of preparing a terrorist act due to new evidence brought in by police.
Investigators found proof that the man was planning to kill Centre Party leader Annie Lööf, who had been due to hold a press conference at the time of the murder, which was carried out in broad daylight. The Gotland district court said that Engström had mapped Lööf's agenda and was prepared to kill her.
"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 on Tuesday.
Engstrom pleaded guilty to murdering Wieselgren but said he was not plotting to kill Lööf. A mental health evaluation carried out while Engström was in detention found that he was suffering from severe mental disorder both at the time of the murder and during the evaluation, and he was sentenced to psychiatric care.
When the trail ended, prosecutor Henrik Olin demanded a life sentence for Engström in light of the fact that the suspect refused medical care while in detention, according to Swedish media.
Lööf, who resigned as Centre Party leader in September, wrote on Instagram on Tuesday that on the day of the verdict she is mainly thinking of Wieselgren's relatives.
In the post accompanying a picture of the politician standing in front of the spot where the psychiatrist was killed, Lööf spoke of "relief" upon hearing the verdict.
"Engstrom is also sentenced for the preparation of a terrorist crime," she wrote. "It shows that the district court sees the threats to democracy and to politicians as very serious."