STOCKHOLM (Reuters) - Rakhmat Akilov, the main suspect in the truck attack in Stockholm that killed four people and injured 15, has admitted to committing a terrorist crime, his lawyer told a court on Tuesday.

Police believe Akilov, a 39-year-old from the Central Asian republic of Uzbekistan, was the driver of the hijacked beer truck that mowed down pedestrians on a busy street in the Swedish capital on Friday before crashing into a department store.

“His position is that he admits to a terrorist crime and accepts therefore that he will be detained,” Johan Eriksson, the lawyer representing him said in a court hearing to decide whether he should be kept in custody.

Akilov, who entered the courtroom with a green sweater over his head before being seated between his lawyer and translator, was arrested just hours after the attack.

He was arrested on the highest level of suspicion in the Swedish legal system. Akilov was already wanted by police for failing to comply with a deportation order.

Security services said he had expressed sympathies with extremist organisations, among them Islamic State, but had not viewed him as a militant threat.

Akilov had asked for his defence lawyer to be replaced by a Sunni Muslim, but a court denied his request, documents showed.

The attack shattered any sense Swedes had of being insulated from the militant violence that has hit other parts of Europe but politicians have taken a defiant stance, saying Sweden will remain an open, tolerant society.