Swedes questioned their country's welcoming immigration policies with pride and pain on Sunday after learning that an asylum-seeker from Uzbekistan was allegedly behind the truck rampage that killed four people, Stockholm's deadliest extremist attack in years.

The Swedish capital was slowly, but resolutely, regaining its normal rhythm as details about the 39-year-old suspect in the attack emerged. Police said he had been ordered to leave Sweden in December because his request for a residence permit was rejected six months earlier.

Instead, he allegedly went underground, eluding authorities' attempts to track down and deport him until a hijacked beer truck raced down a pedestrian street and rammed into an upscale department store on Friday.

Story continues below advertisement

"It makes me frustrated," Swedish Prime Minister Stefan Lofven told Swedish news agency TT on Sunday.

The suspect, who has been detained on suspicion of terrorist offences, was known known for having "been sympathetic to extremist organizations," Jonas Hysing of Sweden's national police said.

A second person was arrested on the same potential charge Sunday, and four others were being held by police. None of them have been identified.

Security officials in neighbouring Norway, where a 17-year-old asylum-seeker from Russia was detained early Sunday in connection with an explosive device found near a busy subway station, spoke of the alarming potential for a copycat effect.

Norwegian's security agency said it wasn't clear if the teen planned to carry out an attack with the primitive homemade device police defused without any injuries. Agency head Benedicte Bjornland said it was likely the youth had been inspired by recent attacks in Stockholm, France, Germany, Britain and Russia.

"The attacks demonstrate how easy such attacks can be carried out, and prove to others that it is possible to make something similar," Bjornland said.

Sweden has long been known for its open-door policy toward migrants and refugees. But after the Scandinavian country of 10 million took in a record 163,000 refugees in 2015 – the highest per-capita rate in Europe – the government has tried to be more selective about which newcomers it allows to stay.

Story continues below advertisement

Swedish police said Sunday they had received roughly 12,500 referrals from the Swedish Migration Board of people who, like the suspect in the truck attack, had overstayed their welcome.

The suspect eluded authorities by giving police a wrong address after his residency request was rejected in June 2016, said Hysing, the operative head of the attack investigation.

"The efforts to locate (these people) is both time-consuming and resource-intensive," he said.

National Coordinator Against Violent Extremism Anna Carlstedt, who used to lead the Red Cross in Sweden, said Friday's attack and the background of the suspect posed "difficult questions."

"Do we somehow need a more repressive policy?" Carlstedt said. "I think it is very important now not to rush into something, to see how we can safeguard this open society and still be able to protect ourselves."

The range of mixed emotions – fear and fraternity, anger and openness, – also surfaced at memorial services and rallies held in Stockholm on Sunday to honour the attack victims.

Story continues below advertisement

Lars Holm, a 73-year-old Stockholm resident was visibly upset, after attending a service at Stockholm Cathedral.

"If people who are here seeking asylum and treat us like this, it is not good," Holm said. "So now we have to have more security in our society, but still we don't like to live in bunkers."

Addressing tens of thousands of people rallying in bright sunshine on the downtown Sergelstorg square, organizer Rickard Sjoberg noted that many in the crowd probably were from out of town.

"But today, were all Stockholmers," he said to huge applause.

The four victims killed included a British man, a Belgian woman and two Swedes, authorities in those countries said. Their identities were not released by Swedish officials.

The British government named the Briton as Chris Bevington, an executive at Swedish music-streaming service Spotify. In Brussels, the Belga news agency said the Belgian woman had been reported missing before she was identified by her identity papers and later by DNA testing.

Story continues below advertisement

As of Sunday, 10 of the 15 people wounded remained hospitalized, including one child.

Stockholm county spokesman Patrik Soderberg said four of the 10 were considered "seriously" injured and the remaining six, including the child, were slightly injured.

One of the wounded, an 83-year-old Romanian woman who was begging on the city's pedestrian Drottninggatan shopping street when the attack took place, said she was "surprised" that passers-by helped her.

"I thought everyone would run past me and save themselves," Papusa Ciuraru, whose foot was crushed by a boulder displaced by the speeding truck, told the Expressen daily.

The lion-shaped boulders on Drottninggatan are meant as roadblocks and have been put up in several European capitals after a truck attack last year killed 12 people at a Christmas market in Berlin.

Police and Sweden's intelligence have questioned some 500 people as part of the investigation, a senior police officer said. Sweden's SAPO security police said it was working to find "any abettor or network involved in the attack."

Story continues below advertisement

The department store that was rammed by the truck apologized Sunday for an announcement that it would reopen two days after the deadly attack to sell damaged goods at a "reduced price."

The Ahlens store described it as "a bad decision" on its Facebook page, saying its motivation "was born out of the idea of standing up for transparency and not allowing evil forces take control of our lives."

The store said it would reopen Monday "without any damaged goods."