On the first day of his trial last week, Rakhmat Akilov, 40, pleaded guilty to stealing a beer truck on April 7, 2017, and mowing down pedestrians on a busy shopping street, swerving wildly to hit as many people as possible.
Three Swedes were killed including an 11-year-old girl, as well as a 41-year-old British man and a 31-year-old Belgian woman. Ten other people were injured.
Speaking calmly in Russian through an interpreter, Akilov expressed no remorse or regret for his actions.
He told the court today he wanted "Sweden to end its participation in the fight against the caliphate, to stop sending its soldiers to war zones."
More From This Section
He wanted to help "build a caliphate according to Prophet Muhammads prophecies".
"I did this because my heart and my soul aches for those who have suffered from the bombings of the NATO coalition," Akilov said.
Akilov, whose Swedish asylum application was turned down in 2016, swore allegiance to IS on the eve of his assault in one of Europe's safest cities.
After going underground, Akilov spent three months preparing the assault targeting "infidels".
Prosecutor Hans Ihrman said last week the trial should provide a better understanding of "the process of radicalisation" of emerging attackers, who are "marginalised in a foreign country" and take on "symbolic targets".
He added that Akilov's case "fits into a broader framework" of jihadists.
After crashing the truck into the facade of a store, Akilov detonated an explosive device -- made up of five gas canisters and nails -- though it didn't explode as planned and caused damage only to the truck.
He said he wanted "to die as a martyr in an explosion".
Akilov fled the scene by running into a nearby metro station, and was arrested several hours later thanks to public transport video surveillance images.
One of the key questions in the case, which is unprecedented in the Scandinavian country, is whether Akilov had any accomplices.
But they have recovered several smartphone exchanges he had with unidentified contacts on encrypted chat sites before, during and after the attack.
After arriving in Sweden in 2014, at the start of a huge wave of migration to Europe, Akilovs application for residency was rejected in June 2016.
He later went underground to avoid expulsion and worked odd jobs in construction.
The father of four, who drank alcohol and used drugs according to colleagues and acquaintances, lived alone in Sweden. His wife and children stayed behind in Uzbekistan.
"My clients are eager to hear what he has to say, what his motives are," Gustaf Linderholm, a lawyer representing the victims, told AFP on the eve of Akilov's testimony.
A life sentence in Sweden varies, but is on average 16 years.
The trial is scheduled to last through May, with a verdict due in June.