A highly critical Ofsted report revealed last month that staff had behaved “extremely inappropriately” towards children and caused them “distress and humiliation”.

The official body is set to make a further unannounced inspection in the autumn which ministers say could trigger the termination of the firm’s contract if problems aren’t solved.

“The safety and welfare of young people in custody is vital and the Ministry of Justice takes the issues raised in the recent Rainsbrook inspection report extremely seriously,” said justice minister Lord Faulks.

“We have taken immediate action to make sure these are being addressed by the operator. The leadership at Rainsbrook has been replaced and the Youth Justice Board are closely monitoring the implementation of an action plan.

“A further unannounced inspection will take place in the Autumn. If G4S fail to resolve the issues raised, further contractual remedies are available, including contract termination.

Young offenders escorted by staff at Rainsbrook Secure Training Centre

“Contracts for the Medway and Rainsbrook Secure Training Centres are currently being retendered. It would be inappropriate to comment further at this stage.”

The centre is specified to house nearly 90 young people between the ages of 12 and 18 who have been subjected to a prison sentence.

In 2004 a 15-year-old died at the prison after guards restrained him using a now-banned technique. In the space of six months children at the centre were restrained 166 times, in 72 cases to prevent an inmate self-harming, the inspectorate said.

Ofsted also said staff were likely smuggling contraband into the prison and that there had been “unacceptable and inexplicable delays” in removing staff from roles in caring for young people after worrying incidents.

Other incidents catalogued by Ofsted were said to be so serious that they were withheld from the public report to protect the confidentiality of the children involved.

Frances Crook, chief executive of the Howard League for Penal Reform, said the prison should never have been set up in the first place and should now be closed.

A G4S logo

“This is the worst report on a prison I have ever seen because it is a catalogue of abusive practices that have been inflicted on young children who have no escape,” she said after the release of the report.

“I visited Rainsbrook some years ago and found it to be claustrophobic and obsessed with security, a recipe for exactly the disaster now happening.

“These child jails run for profit are secretive and should never have been set up in the first place. Rainsbrook should be closed immediately. No child is safe in this jail.”

G4S’s director of children’s services Paul Cook said at the time of the report’s publication that the company was working to address failures.

“This was an extremely disappointing report for everyone connected with Rainsbrook as it was the first time in 16 years that the centre has been found by any inspecting body to be less than ‘good’ or ‘outstanding’," he said.

“We recognise that the incidents highlighted by inspectors were completely unacceptable and took swift action at the time, in discussion with the Youth Justice Board (YJB).

“'The YJB has expressed confidence in our action plan to address all the concerns raised and I am keen for inspectors to re-visit the centre at their earliest opportunity to check on our progress.”