Rakhmat Akilov was also convicted of the attempted murder of 119 other people who were at the scene of the attack.
The killings shocked a nation that had largely considered itself safe from the kind of militant assaults that have hit France, Spain, Britain and other countries in recent years.
“The defendant has among a series of crimes been found guilty of (a) terrorist offense by murder in five cases. The penalty has been set to life imprisonment,” the Stockholm District Court said in a statement.
“He has also been found guilty of 119 cases of attempted murder, which have been labeled as (an) attempted terrorist offense.”
Akilov hijacked a beer truck outside a restaurant in central Stockholm on April 7 last year and sped about 500 meters (yards) down a pedestrian street, plowing into shoppers before crashing the vehicle into a department store.
He was arrested the same day outside a gas station in a Stockholm suburb after he was recognized from a CCTV image and quickly admitted to being the driver of the truck. He stated during the trial that he wanted to punish Sweden for its part in the global fight against the militant Islamic State group.
Sweden has taken part in international peacekeeping missions in Mali, Afghanistan, Iraq, Kosovo and other states in recent years, but has not fought a war in more than two centuries.
Soon after the attack, Prime Minister Stefan Lofven said Sweden would stick by its open, liberal values.
Life sentences in Sweden are usually commuted to a fixed term.
More about: #Stockholm