Children in custody in England and Wales are being exposed to "harrowing incidents" of physical and sexual abuse, a report has found.
There were 1,070 reported incidents of abuse between 2009-2017 - many more than previously thought, the child abuse inquiry said.
Most claims were made against staff.
Inquiry chair, Professor Alexis Jay, said she was "deeply disturbed" by the accounts heard, and warned children in institutions were still at risk.
The Independent Inquiry into Child Sexual Abuse (IICSA) looked at young offender facilities, secure training centres and secure children's homes as part of a wider investigation into child abuse in England and Wales.
Many of the incidents involved staff inappropriately touching detainees during body searches or instances of restraint.
The report includes examples from adult victims and survivors who were abused as children while in custody, as well as recent examples.
Prof Jay said: "I am also deeply disturbed by the continuing problem of child sexual abuse in these institutions over the last decade.
"It is clear these children, who are some of the most vulnerable in society, are still at risk of sexual abuse. I hope our report and recommendations can help protect them better in future."
Over a thousand incidents of abuse were reported over a seven year period, which is a "shockingly high" figure, considering the current population of children in custody is around 900.
'Staff trained to use force'
The inquiry found children who are detained can be as young as nine-years-old, often come from unhappy and disrupted childhoods, and are "the most vulnerable in society".
The report examined institutional failures and said cultural factors in custodial institutions could prevent proper prevention, exposure and investigation of child abuse.
It said children in detention could often lack credibility due to their age, mental health or offending behaviour.
It said the closed nature of institutions meant the normal scrutiny of parents, friends and visitors was not possible.
The inquiry heard two weeks of evidence in July last year.
It found recent examples of abuse, including an allegation that a female member of staff had abused children at Medway secure training centre in Kent in 2015.
At Rainsbrook secure training centre in Warwickshire, members of staff allegedly allowed two young people to go into a bedroom together, knowing that one of the young people was going abuse the other.
The report said there was a power imbalance between staff and children, where staff were trained to use force, including "pain compliance techniques".
They are methods allowed by Ministry of Justice guidance, including manipulating a person's joints or activating pressure points to achieve 'good order and discipline'. For example, staff members may bend a child's thumb or wrist.
The report said the Ministry of Justice (MOJ) should prohibit the use of "pain compliance techniques", and said it should work with the DFE on policies to safeguard children in institutions.
Children were dependent on staff for every part of day-to-day life, including access to privileges, food and visits, it said.
The independent inquiry has called for the Department for Education and the Youth Custody service to review whether children who need help for welfare reasons should be placed with children who are in the criminal justice system, and whether this increased the risk of sexual abuse.
Justice Minister Edward Argar said the details in the report were shocking.
He said the government recognised the need for reform to ensure the safety, welfare and rehabilitation of young people are prioritised.
He added: "We are already conducting an urgent review into safeguarding in the youth estate, rolling out new specialist training for staff and have commissioned an independent review of pain-inducing restraint techniques."