By Alison Holt
BBC News, Social affairs correspondent
The Home Office has agreed to an independent inquiry into the treatment of young people with mental health problems in the prison system.
There are concerns young inmates do not get help
The BBC has learned the investigation will concentrate on the case of one young girl.
She was taken to hospital 20 times in two years after self harming whilst in young offenders institutes.
It is estimated a third of young people in our jails should be getting better treatment for mental health problems.
The girl - who can't be named - was jailed when she was 17 for assault and robbery.
She had been in care and had a history of mental health problems.
But despite continually cutting herself and trying to take her own life in prison, it took a court injunction to get her moved to a secure psychiatric hospital.
Chris Callender is a lawyer at the Howard League for Penal Reform who is working on this case.
He told the BBC that he comes across many similar stories.
Not getting help
Mr Callender believes they aren't getting the help they need.
He said: "There are many children who get lost in the system sitting in prisons with mental health problems who are going to be released, but aren't getting the support and services they need to make them better people."
One such person is Jane. She asked us to disguise her identity.
She was also in and out of care and went to prison at the age of 17 for shoplifting to feed her drugs habit.
She was depressed and self harming, but no one took the time to discover the abuse behind her problems.
"In the beginning I never really wanted to tell anyone," she remembers.
"But I feel if someone took more time and spoke to me more than once or twice for me to feel comfortable I think that I would have said something.
"If I had someone to make me understand what happened and that it wasn't my fault, I think it could have helped. "
Phil Wheatley, the head of the prison service, has said mental health care in prison is improving.
He believes the independent inquiry is into an extreme case, but he still welcomes it.
"I think it's important we do find out exactly what happened and why it happened and we can learn lessons from it.
"I certainly want to ensure that everybody in the prison service cooperates fully with that."
But Sir Al Aynsley Green, the Children's Commissioner for England, believes the key must be to look at what is happening to these children before they get into trouble.
He said: "So many children who end up in prison come from socially excluded backgrounds.
"So getting in early, recognising families at risk, recognising parents at risk and giving them apropriate comprehensive support must be one of the best ways of investing for the future."