Police have released an official Home Office image of Badreddin Abadlla Adam, who was shot dead by officers during an attack at the Park Inn Hotel in Glasgow on Friday.
Mr Adam, 28, from Sudan, was killed after six people were injured in the West George Street attack, including police constable David Whyte, 42.
Three of the other male victims are asylum seekers while two are members of hotel staff.
They are aged 17, 18, 20, 38 and 53 and all were still in hospital as of Saturday, one in a critical condition.
Police released the identity of Mr Adam on Saturday, saying it was “based on information the deceased provided to the Home Office earlier this year”.
Meanwhile, a man who said he knew the perpetrator told ITV News he warned of the attack the night before.
Giving his name as Siraj, he said Mr Adam told him: “‘I will attack’ so everyone should take it seriously.
“I told him ‘no, there’s no need to attack’ and he said ‘they hate me, I hate them, they are against me’.
“He started to say a lot of stuff like that but I said ‘nobody hates you, nobody knows you, nobody knows each other’.
“I reported him to the hotel reception and then the next day, yesterday morning, the housing manager talked to me and I said to him everything he (the attacker) said to me.
“And in the afternoon, it happened.”
Police Scotland, which has said the attack is not being treated as terrorism, has launched an appeal for any witnesses to come forward.
The Park Inn hotel was being used to house asylum seekers at the time of the incident.
Campaign groups have criticised a policy of moving asylum seekers into hotels during the coronavirus pandemic.
Scotland’s Communities Secretary Aileen Campbell said she is “seeking an urgent call with the Home Office about asylum accommodation”.
Earlier, Constable Whyte thanked his colleagues for saving lives.
He said he will never forget the scene officers attending the incident were confronted with.
He added: “As the first responders on scene, myself and my colleague did what all police officers are trained for, to save lives.”
The officer thanked his colleagues who “put themselves in harm’s way to contain this incident and assist with the vital treatment given to myself and others at the scene by other emergency services”.
Mr Whyte added: “Despite suffering serious injuries myself, I know that the swift actions of colleagues saved lives and prevented a far more serious incident.
“I would like to thank the medical staff at Queen Elizabeth University Hospital for their outstanding care in the hours following this incident.”