Rakhmat "Akilov confesses to a terrorist crime and accepts his custody detention," his lawyer Johan Eriksson told a court custody hearing in Stockholm.
Four people were killed and 15 others were injured in the attack on Friday.
Appearing in the heavily guarded Stockholm District Court wearing a thick green hoodie and holding his head down, Akilov was known to have shown interest in terrorist organisations according to the police.
After Eriksson's statement, the rest of the hearing was held behind closed doors at the request of the public prosecutor's office and journalists were told to wait outside.
Akilov, a construction worker who had been refused permanent residency in Sweden, was arrested several hours after the attack. He was detained in Marsta, a suburb north of Stockholm.
He had gone underground after his application for Swedish residency was rejected last year, police said.