Staff at a Glasgow hotel where an asylum seeker launched a knife attack were warned he was mentally unstable the night before he struck.
Fellow residents at the Park Inn had reported concerns about his mental state prior to the incident, and the warning was passed to staff in a phone call on Thursday evening.
Sky News has been told the Sudanese man had begun to behave erratically.
One fellow resident recalled how he had told him he wanted to attack other people in the hotel, including staff.
Other Sudanese asylum seekers had become scared of him and made their concerns known to a Glasgow-based liaison worker who deals with asylum issues.
The liaison worker phoned staff at the hotel reception desk at 11pm on the night before the attack to pass on the concerns.
The asylum seeker, who came to the United Kingdom six months ago, had been complaining about living conditions in the hotel and was having particular difficulty with noise.
Sky News also understands that in the minutes before the assault, he had a telephone consultation with an immigration solicitor.
During the call, around 11am on Friday, the same individual who had warned hotel reception staff had taken part in the three-way conversation.
During the consultation, he told the lawyer of his concern for the man's state of mind
The solicitor said he would pass on the concerns to the "safeguarding" team at the Home Office, set up to protect people in vulnerable circumstances.
However, shortly after ending his call with the lawyer, the man launched the knife attack inside the hotel at 12.50pm.
Six people, including 42-year-old police constable David Whyte, suffered stab wounds and are being treated in hospital.
The officer, who had been critical, is now said to be in a stable condition.
Three of the other people who were injured were asylum seekers staying at the hotel, while the other two were members of staff.
Of those five, aged 17, 18, 20, 38 and 53, one is described as critical but stable and the others stable.
The suspect was shot dead by armed police responding to the incident, which is not being treated as terrorism.
Siraj, an asylum seeker who was in the same hotel, revealed how the suspect had made violent threats previously.
He told Sky News: "He was saying the people are against him, the people hate him.
"The next room, they were making some noise and he was saying the noise was just to disturb him. The room on top of him the same.
"One day he said 'I want to attack them. I want to attack that room next to me. That room on top of me'. He said 'I want to attack the hotel workers'.
"I said to him 'Not needed, there's no logic to do that, everyone is fine just try to ignore everything'."
Commenting on the latest development about the suspect's state of mind, Sky News' policing analyst Graham Wettone said: "It gives the investigation team a line of inquiry to follow.
"They have got to speak to the people that had that contact with him immediately before and the night before - the why, the motive is the key part for them."
The Mears Group, which is contracted by the Home Office to provide housing and support services to asylum seekers in Scotland, said it was "deeply saddened and shocked by the tragic events in the heart of Glasgow".
It said in a statement: "We will not anticipate a live police investigation, but we can confirm that the attack happened in a hotel where we are housing asylum seekers during the lockdown period."
A spokesman for the Radisson Hotel Group said: "Our thoughts are with those affected and their families during this very difficult time.
"We cannot provide further comment as this is a live police investigation."