An Uzbek man suspected of ramming a truck into a crowd in Stockholm, killing four people, had expressed sympathy for Islamic State and was wanted for failing to comply with a deportation order, Swedish police say.
Another 15 people were injured on Friday when a hijacked beer delivery truck barrelled down a busy shopping street before crashing into a department store and catching fire. The Uzbek was arrested several hours later.
"We know that the suspect had expressed sympathy for extremist organisations, among them IS," Jonas Hysing, chief of national police operations, told a news conference on Sunday.
In Europe, vehicles have also been used as deadly weapons in attacks in Nice, Berlin and London over the past year and were claimed by Islamic State. There has been as yet no claim of responsibility for the Stockholm assault.
The Stockholm suspect, aged 39 and from the Central Asian republic of Uzbekistan, applied for permanent residence in Sweden in 2014. But his bid was rejected and he was wanted for disregarding an order for his deportation, Hysing said.
Police had been looking for him since the Nordic country's Migration Agency in December gave him four weeks to leave the country. He had not been known as a militant threat by the security services before Friday's attack.
Two of the dead were Swedes, one was a British citizen and the other from Belgium, Hysing said.
Judicial officials said a second person had been arrested in relation to the investigation into the attack. But police said they were ever more convinced that the Uzbek man was the driver of the commandeered truck and may have acted alone.
Another five people were being held for questioning after raids during the weekend and police said that they had conducted about 500 interviews as part of the inquiry.
Of the injured, 10 remained in hospital, two of them in intensive care.
In neighbouring Norway early on Sunday, police set off a controlled explosion of a "bomb-like device" in central Oslo and took a suspect into custody. Police across the Nordic region went on heightened alert after the Stockholm attack.
Stockholm was returning to normality on Sunday with police barricades taken down along the Drottninggatan street where the attack took place.
Hundreds of flower bouquets covered steps leading down to the square next to where the truck ploughed into the Ahlens department store, with more piled up under boarded-up windows.
A memorial service was planned in Sergelstorg, the central square next to Drottninggatan, later on Sunday.
Sweden has long taken pride in its tolerant liberal democracy and been among the world's most welcoming nations to immigrants.
But some Swedes are having second thoughts after more than 160,000 people, many from Syria, applied for asylum in 2015 in a nation of just 10 million.
The Ahlens store cancelled a planned half-price sale of smoke-damaged goods on Sunday and apologised to customers after a storm of protest on social media that such a step would be disrespectful to the attack victims.