The attack occurred in the Swedish city of Vetlanda in March. All seven victims survived and the attacker was wounded by the police while being apprehended.
The 22-year-old was charged with seven murder attempts. He was also ordered to pay 1 million Swedish kronor ($115,900) in compensation, according to the ruling landed on Wednesday. The Afghan national reportedly pleaded guilty in three assaults out of seven and could not account for the reason of his action.
The local media said that the man came to Sweden from Afghanistan in 2018.