A teaching assistant was stabbed to death with the sword of the Swedish school attacker when he threw himself in front of a group of children to protect them from the rampage.

Lavin Eskandar, 20, was killed trying to shield pupils at Kronan School from the attacker when he entered a ground-floor café in the school wearing a Darth Vader mask, according to Swedish newspaper Expressen.

The teaching assistant had completed secondary school, having received a media studies diploma, this summer and hoped to become a director and photographer.

His older brother Leith Eskandar told the newspaper: “He was the finest man.

“All I know is that he cared about others and not himself and that he was trying to protect children. He is the king and hero of the entire city.”

The attacker was dressed as Darth Vader and shouted 'I am your father' during his rampage (AFP)

Friends have described Mr Eskandar as a valued and kind person who loved working with music and produced commercials and music videos for Swedish artists.

He had a keen interest in film and his YouTube videos received millions of views.

The killer’s second victim has been identified by Swedish media as Ahmed Hassan, a 15-year-old student at the school who arrived in Sweden with his parents and eight siblings from Somalia in 2012.

His mother Kiin Mohammed Ali told Expressen: “I ran to the school looking for him and I was so scared. I looked and looked but I could not find him anywhere. In the end the police came up to me and said that Ahmed was in the hospital.

“I loved him so much, so much. He was so kind and so helpful.

“He liked school and was very happy and so good.”

Swedish media have named the man behind the attack as 21-year-old Anton Lundin Pettersson, who initially posed for photographs with pupils at the school who assumed he was playing an early Halloween prank.

Police said today that the attack was racially motivated.