Swedish officials say the main suspect in a knife attack that killed two people at an Ikea store in the central Sweden was due to be deported after his request for residency was rejected last month.

The Migration Agency said the 35-year-old Eritrean-born man had met with agency staff hours before Monday's attack.

Agency spokeswoman Johanna Mahlen said Wednesday that officials had twice rejected a residency application from the suspect, who arrived in Sweden in 2013. She declined to give further details.

The seemingly random attack killed a 28-year-old Swedish man and his 55-year-old mother. The main suspect has not been questioned because of surgery for unspecified severe injuries. They were holding another Eritrean-born, 23-year-old man, who has denied involvement in the stabbing.