Lavin Eskandar's coffin arrived at Håjums cemetery in Trollhättan just after 11am as friends, family and residents turned out to remember him.
Some clutched white roses or photos of the teaching assistant, while others wore their school graduation caps at the request of the stabbing victim's family. Eskandar only graduated from high school in June.
The 20-year-old was killed on Thursday after throwing himself at the sword-wielding masked man in a bid to disarm him as he entered the school in the southwestern industrial town of Trollhättan.
A teenage student also died in the violence, and his funeral was set for Friday.
“The terrorists killed Lavin, he was a kind person, he was nice to everyone. Go son, I'm proud of you,” Eskandar's mother, Intesar Fares, wailed during the service.
The memorial ended with white doves being released, while a paraglider flew above the crowds, displaying the message “Lavin is a hero”.
After the ceremony, Lavin's cousin, who gave her name only as Lucy, said the attack had created a climate of fear in the town.
“People are worried about going out on the street. It's not safe, people are not comfortable anymore … We are against hatred, we are against terror, the most important of all things is humanity. We have to wipe out racism and terrorism,” she told the AFP news agency.
Lavin Eskandar, who was killed in the Trollhättan attack. Photo: Private
A petition calling on the government and the Swedish Royal Court to award a posthumous medal for bravery to Lavin Eskandar has been gaining momentum in Sweden after the idea was put forward by Stockholmer Michael Sigge.
“This young guy didn't hesitate for a second to shout to the students to take cover and then to take on this sword-wielding assailant bare-handed,” he told The Local.
Eskandar's brother Leith, 22, described the teaching assistant as “a real, real hero”, when speaking to The Local last week.
“We are all destroyed, the whole family is destroyed,” he added.