The 39-year-old Uzbek man is suspected of having driven a truck into a department store in the city on Friday.
His application for residency was rejected in June last year and he was being sought by immigration officials, police said.
Meanwhile, a second suspect has been placed under formal arrest.
Police said they were investigating the second suspect for a "terrorist crime [by committing] murder".
However, Reuters news agency said the person was arrested on "a lower degree of suspicion" than the first suspect.
Police have interviewed more than 500 people over the incident, Sweden's TT news agency