The suspect was arrested shortly after the knife and axe attack in March.
An 18-year-old man has been given a life sentence for murdering two teachers at a school in Malmö with a knife and axe.
Fabian Vidar Cederholm was found guilty of two counts of murder on Thursday and handed the maximum sentence.
Cederholm, who was a student at the central Malmö Latin School, was arrested shortly after attacking and killing two women on March 21.
Both victims -- Victoria Edström and Sara Böök -- were found on the third floor of the secondary school in southern Sweden, 10 minutes after police were alerted.
Around 50 people were inside the school at the time of the attack, and many students locked themselves in classrooms.
Prosecutors say the 18-year-old wasn’t previously known to authorities and had no criminal record. He had confessed to the murders.
The Malmö court sentenced Cederholm to life in prison because “the acts were particularly reckless,” although the motive for his violent acts has not been fully clarified.
“These are two very brutal murders where the victims suffered severely,” Judge Johan Kvart said in a statement.
Anders Elison, the defendant’s lawyer, had earlier told Swedish media that his client's actions were “completely inexplicable” and that the attack was not aimed at the school or the two teachers. He had also claimed that the young man suffered from mental health problems.
A life sentence in Sweden generally means a minimum jail term of between 20 and 25 years, but can be extended.