The Scottish government has ordered a review of mental health services for young people in custody.
It follows recent deaths at Polmont Young Offenders Institution.
Sixteen-year-old William Lindsay died while on remand there in October and 21-year-old Katie Allan took her life in June while detained for a drink-driving offence.
Justice Secretary Humza Yousaf said the review would involve a mental health expert and HM Inspectorate of Prisons.
The review is expected to report back early next year.
It will look at mental health provision for young people entering custody, including background information ahead of their admission, reception arrangements, and ongoing support and supervision while in custody.
Mr Yousaf announced the review in a letter to the Scottish Parliament's justice and health committees.
Health Secretary Jeane Freeman has also confirmed that NHS Forth Valley has already engaged with the Scottish Prison Service to assess and increase provision for people living at Polmont.
In his letter, Mr Yousaf said that although fatal accident inquiries would be undertaken into the deaths of William Lindsay (also known as William Brown) and Katie Allan "I have reflected on some of the more immediate questions raised particularly around the provision of mental health support and services for young people in custody".
He said the review would look at relevant operational policies, practice and training and where practical, would also look at comparisons between the support and arrangements in place in secure care accommodation and HMP&YOI Polmont.
He added: "As with current formal inspection and independent monitoring arrangements for prisons, the review will include direct engagement with young people in custody about their experiences.
"The review will not consider the specific circumstances of recent cases which are the subject of current or future mandatory fatal accident inquiries.
"We are also aware of issues being raised about the information that is available about a young person's history before decisions are taken that can lead to them being sent to custody or secure care. Separate consideration is being given to how best to look at these issues."
Ms Allan, a 21-year-old geography student at Glasgow University, was convicted in March of a drink-driving offence which saw her injure a pedestrian and she was sentenced to 16 months in jail.
Stuart and Linda Allan said their daughter was bullied in Polmont YOI near Falkirk and lost more than 80% of her hair due to the state of her mental health. She died there in July.
They had called for a review of the Scottish prison system.
Mr Lindsay, who was also known as William Brown, was one of four deaths in the space of two days at Scottish jails last month.
An entry on the Scottish Prison Service (SPS) website states he was remanded at Glasgow Sheriff Court on Thursday 4 October.
He died on Sunday 7 October.
Lawyer Aamer Anwar, representing the families of Ms Allan and Mr Brown, said they cautiously welcomed the announcement of a review.
"The deaths of Katie and William were never inevitable, the system and the Scottish Prison Service (SPS) failed them," he said.
"The families of Katie Allan and William Lindsay expect and demand a lot more to happen in the days and weeks ahead.
"Today is a good start, but the families hold Polmont responsible for suicides which took place, ultimately they failed in their duty of care.
"If this review is independent then the families wait to see the proof of that as they must be fearless in the questions they ask."