Police arrested a man on Friday night after the attack that was carried out with a hijacked beer truck, but only identified him as a 39-year-old Uzbek whose Swedish residency application was rejected last year.
The man suspected of carrying out the Stockholm truck attack has confessed to a "terrorist crime", his lawyer said.
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. Johan Eriksson added that his client stands by his position and accepts to be detained.
A second man is no longer being held as a suspect, according to prosecution authorities, but he will not be released because he already had a deportation order standing against him.
The Stockholm District Court ruled Tuesday that police may detain Rakhmat Akilov for a month.
The truck driven by Akilov had crashed into the front of Ahlens department store on Drottninggatan (Queen Street), one of the city's main pedestrian thoroughfares.
Akilov, a construction worker who had been refused permanent residency in Sweden in June 2016, had gone underground past year after receiving a deportation order, police said.
Trump signs order to implement 'Buy American, Hire American'
But they are confident that greater "engagement" with the Trump administration will help soften their stance towards H-1B visas. Currently, 85,000 H-1B visas are given out annually to higher skilled foreign workers who have job offers from American firms.
"We need to detain people when there is a risk they will go underground, and there appear to be around 10,000 to 15,000 cases", said Mr Akesson, whose party won nearly 13 per cent of votes in the 2014 legislative election.
Two Swedes, one Belgian and a Briton were the victims of the last Friday attack. "But you never know, you never know (what can happen)", said Sankar Ramasuppu, a bank worker living in Stockholm.
Swedish Prime Minister Stefan Lofven, who led a nationwide minute of silence for the victims yesterday, said he was "frustrated" by the problem, while far-right Sweden Democrats leader Jimmie Akesson called it a "huge scandal".
Some 20,000 people gathered on Sergels Torg plaza on Sunday.
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".
Eriksson said it was important "to uphold democratic principles and that he gets the same defense as anyone else".
A nation of 10 million, Sweden took in 244,000 asylum seekers in 2014 and 2015, more per capita than any other country in Europe.