Young people must be given frequent access to mental health care provision while under detention, MSPs have been told.

Nick Hobbs, the head of advice and investigations for Children and Young People's Commissioner Scotland, made the comments as Holyrood's Justice Committee heard evidence into secure care places for children and young people in Scotland.

The committee inquiry follows the deaths of 21-year-old Katie Allan and 16-year-old William Lindsay whilst being detained at HMYOI Polmont last year.

The parents of Ms Allan launched a campaign calling for changes to the way the legal system deals with mental health.

Speaking at the committee on Tuesday, Mr Hobbs said decision-making around the detention of young people should consider their experiences and wellbeing.

He said the commissioner also supports recommendations made by the chief inspector of prisons that children should not be detained at Polmont.

"I think the written paper we provided to the committee makes clear that what we're looking for and what needs to happen is a human rights based approach to children across the board," Mr Hobbs said.

"So the first thing that recognises is that children are defined as under 18 in terms of the United Nations convention on the rights of the child.

"And secondly, deprivation of liberty and detention of children should only restrict children's rights to liberty where it's necessary.

"So that means that children's rights to education, to family life, to health care which includes mental health, must not be restricted by a decision to deprive them of their liberty in whatever form that takes."

He continued: "We certainly have concerns that children need to be provided with facilities and with services that meet their mental health needs, that ensure their rights to health are properly respected.

"We need to make sure that the process through which children are deprived of their liberty, the decisions that are taken, recognise and understand that these are children who are rights holders who have very often experienced trauma, adverse childhood experiences, who are often struggling with things like mental health.

"And so the decision-making process from the police, from the reporter, from the children's hearing, from the sheriff, from the Crown Office - all the way through - must reflect and understand these kind of potentially traumatic experiences that children have undergone.

"And the places where we do detain them, when we do need to detain them, need to make sure that they have appropriate and regular and frequent access to mental health provision.

"The chief inspector of prisons' report raises concerns about the access to mental health in Polmont and I think there's a broader point there about children's access to mental health provision, not just in secure care but across Scotland more generally.

"So that's something we hear regularly and consistently from the children that we work with when we ask them what are the issues they're most concerned about, mental health frequently comes up."