The Sweden police has confirmed that the attack in a school in south-west Sweden was a hate crime.
The Police Chief Niclas Hallgren has confirmed it as a racially motivated hate crime, partially because the man chose his victims based on the colour of their skin, reported the Guardian.
The 21-year old assailant Anton Lundin Pettersson was shot dead by the police.
Though the police are convinced that the attacker was alone at the crime scene but they are investigation whether he had contact with someone else.
The attacker as described by a local man was quiet and reclusive. His Facebook and YouTube pages show that he liked movies that glorified Nazi Germany.
Though he had no obvious political affiliation but had recently signed up to a campaign by the anti-immigration Sweden Democrats party for a referendum to halt refugees coming to Sweden.
Also Read
Even the school that he carried out the killings, had a high proportion of immigrants
A 17-year-old student and a teacher were killed in the attack, while two other victims, aged 15 and 41, are in a critical condition.
Prime Minister Stefan Lofven expressed his sorrow and described it as a black day for Sweden.
Sweden's King Carl Gustaf said Sweden was "in shock" following the attack and that the royal family received the news "with great dismay and sadness".