The Stockholm truck attack suspect was an asylum seeker from Uzbekistan who had his application for Swedish residency rejected and was being sought for deportation, police said.
Jan Evensson, of Stockholm police, told a news conference on Sunday that the 39-year-old suspect's request was rejected in June 2016 but police could not find him for deportation because he was not at the address he had given.
Jonas Hysing, of Sweden's national police, said "we know he has been sympathetic to extremist organisations".
Mr Evenssen said police are holding five more people in connection with the deadly attack on Friday and have questioned over 500 others.
He said the four victims killed in the attack included one person from Britain, one from Belgium and two Swedes.
A second person has been arrested in connection with the attack and is suspected of terrorist offences, including murder, and police are holding f our others.
The mayor of Lembeek, in the Belgian city of Halle, says one of the four killed is a 31-year-old woman who was living in his town.
Dirk Pieters said: "I met her several times. I know very well her parents. They are very nice people who have lived in Halle for a long time."
Mr Pieters added: "I'm shocked after each attack, but when you put a face on a victim and personally know her parents, it's even worse."