The circumstances of the release of a prisoner who murdered a man a day later are being probed by the Crown Office, BBC Scotland has learned.
Stuart Quinn, 35, stabbed Alan Geddes 40 times in Aberdeen in 2019.
A court heard Quinn travelled to a homeless unit only to find it was shut. Father-of-one Mr Geddes, 56, let him stay in his flat but was then attacked.
His sister Sandra Geddes met justice secretary Humza Yousaf and then said: "We need to find out what went wrong."
Quinn - who had a record of violent behaviour - was jailed for a minimum of 18 years last month for the murder.
The High Court in Glasgow was told he had been freed just the day before the killing, after previous convictions for assault.
Councils have a duty to offer temporary accommodation to those leaving prison.
Sources say standards on the best way to house prisoners on their release have been developed, and that all those involved in this process - the prison service, local authorities and housing providers - are being encouraged to fully implement the plan.
However Aberdeen City Council said: "Aberdeen City Council's homelessness services operate 24/7, 365 days per year. There is no record of Mr Quinn presenting to Aberdeen City Council for support."
And Aberdeenshire Council said: "We were not informed of Quinn's release from prison in December, nor were we approached by him on the day of the incident."
Quinn was said to be "upset and crying" on his release and was due to receive help for personal issues.
The court heard that, unable to find a bed, he ended up in a lap dancing club in the city. Mr Geddes was also there with a friend, and chatted with Quinn.
Mr Geddes - a former model - offered to pay for Quinn to stay at a hotel, but it was full so he allowed Quinn into his flat in the city's Ruthrieston Crescent.
Mr Geddes was later found lying at the bottom of stairs with multiple injuries.
Police arrived to find Quinn clutching a knife, which he threw down, and he admitted what he had done.
Quinn initially stated he had stabbed Mr Geddes in self-defence but Mr Geddes had injuries suggesting he tried to ward off the killer.
Ms Geddes told BBC Scotland News: "My questions are around the release, there are lots of issues here, we need to find out what went wrong.
"If the right procedures had taken place, my brother would have still been here today, his son would have had his dad. I believe it was a big failure by the system."
'Case is overwhelming'
Of Monday's discussions with Mr Yousaf, she said: "I didn't know what to expect from the meeting and I am warmed by it.
"The justice secretary was very open and honest.
"We will hopefully make some changes in the future that will prevent any other family going through the same devastation."
The Crown Office said in a statement: "The investigation into circumstances surrounding the death of Alan Geddes, under the direction of the Scottish Fatalities Investigation Unit (SFIU), is ongoing and the family will continue to be kept updated in relation to any significant developments."
Mr Yousaf said: "I was grateful for the opportunity to meet with Sandra Geddes and for her taking the time to tell me about her experience. I know that nothing I say can remove the pain felt by the family, but I have listened to her concerns about this case.
"Given that this matter is under consideration by the Crown Office Scottish Fatalities Investigation Unit, it would not be appropriate to comment further at the present time."
North East Scotland Labour MSP Lewis Macdonald said of the Crown Office investigation: "I think it's encouraging, it's also important to know why somebody whose behaviour had been so violent was in the position he was in.
"There's clearly a recognition that something went wrong around Stuart Quinn's release.
"I think the case for an investigation here is overwhelming."