The man suspected of carrying out the Stockholm terror attack was known to security services, police have said.
Four people were killed and 15 others injured when a beer truck was hijacked and driven through a crowd in the Swedish capital.
Police released a photo of a suspect in the hours after Friday's attack and on Saturday they confirmed a 39-year-old man from Uzbekistan who "matches the description" had been detained over a "terrorist crime".
Anders Thornberg, head of the Swedish security agency, said the suspect "has appeared in our intelligence gathering in the past".
Swedish police chief Dan Eliasson described the detained man as a "marginal character" and confirmed officers found a suspect device in the truck.
Sky sources say the device was a homemade bomb and Swedish media reports the attacker "burned" himself while trying and failing to detonate the device.
Mr Eliasson said: "A technical examination is ongoing, we can't go into what it is right now... whether it's a bomb or a flammable device.
"Nothing points to (us having) the wrong person. On the contrary, suspicions have strengthened as the investigation has progressed.
"We still cannot rule out that more people are involved."
Mr Eliasson added that there were "clear similarities" to the Westminster terror attack last month .
According to Sky sources, the suspect was detained after police were notified of a man who was confused and acting strangely.
He was arrested in the suburb of Marsta, not far from the capital's Arlanda airport.
Swedish prime minister Stefan Lofven said the country "must get through this".
He said: "Terrorists want us to be afraid, want us to change our behaviour, want us to not live our lives normally, but that is not what we're going to do.
"So terrorists can never defeat Sweden, never."
Earlier, Theresa May spoke with Mr Lofven "to express her condolences and those of the British people for the terrible attack".
A Downing Street spokesperson said the Prime Minister "was clear that the UK stands firmly by Sweden's side, and they agreed on the importance of working together to tackle these threats, which we all continue to face".
Security at Swedish borders has been tightened and flags are being flown at half mast in a mark of respect to victims.
Sweden's king and queen have cut short a royal visit to Brazil and are expected to return home later on Saturday.
Authorities say 10 people remain in hospital, four of whom are seriously injured.