The Stockholm truck attack suspect has confessed to a "terrorist crime", his lawyer says.
The admission came at a custody hearing in the Swedish capital.
Rakhmat Akilov, 39 from Uzbekistan, admitted responsibility for the attack in court.
Four people were killed when a lorry was driven into a department store on Friday. A number of people were also injured, including two who are in a critical condition.
"His position is that he admits to a terrorist crime and accepts therefore that he will be detained," said lawyer Johan Eriksson.
Mr Akilov was brought into court in handcuffs.
Security was tight and the press gallery was full, according to a BBC correspondent at the court session, which was conducted behind closed doors.
He was wearing green overalls and had to be told to remove a green blanket from over his head before the hearing started.
Swedish police said Mr Akilov was known to security services.
He had been denied residency in Sweden and had expressed sympathy for so-called Islamic State (IS), they said.
He reportedly ran from the scene of the attack, still covered in blood and glass, and was arrested hours later in a northern suburb of Stockholm.
According to reports, he had left a wife and four children behind in Uzbekistan in order to earn money to send home.
After applying for residency in 2014, he was informed in December 2016 that "he had four weeks to leave the country", police official Jonas Hysing said.
He disappeared and, in February, was officially put on a wanted list.
After the attack, Swedish Justice Minister Morgan Johansson told AFP that he is seeking to toughen the nation's terrorism laws.