Nazir Amso, 42, was stabbed by 21-year-old sword attacker Anton Lundin Pettersson, who walked into the Kronan school in western Sweden on October 22nd.
He had woken from a coma and was believed to be on the road to recovery when he tragically died from his injuries a fortnight ago after fighting for his life in hospital for weeks.
Hundreds of people turned up at the church in Trollhättan on Thursday to pay their respect to the popular mathematics teacher.
Kronan principal Djeno Mahic gave a speech describing his colleague and friend and another teacher read out a poem she had written herself in Nazid's memory.
And Wahed, a 15-year-old pupil who was injured in the attack but survived, put his hand on the white coffin and said: “You were the kindest and best teacher.”
Aida Hadzialic, of Sweden's Ministry for Education, who represented the Swedish government at the funeral, told regional newspaper GT: “He chose to stand between the perpetrator and the children. He saved many people's lives. He sacrificed his own life to save them (…) He is our hero.”
INTERVIEWS: 'We can't go out without our dads and mums'
After the emotional ceremony, his coffin was taken to Håjum cemetery, where teaching assistant Lavin Eskandar, 20, and Ahmed Hassan, 15, who were also killed in the school attack, rest.
Police classified the school attack, the first in Sweden since the 1960s, as a hate crime after CCTV footage showed that Lundin Pettersson, who was shot by officers arriving at the scene, had selected his victims on the basis of their skin colour.