The Government has been accused of “turning prisons into powder kegs” with underfunding, overcrowding and staff shortages as new figures reveal record levels of violence.

Assaults and self-harm reached an all-time high in the past year, according to concerning statistics that also showed that more than 80 inmates were released by mistake or escaped.

Data for England and Wales in the 2016-17 financial year showed 71 prisoners were released in error – the highest number since records started in 2006.

On average, inmates were freed because of blunders more than once a week, including 58 who were released from jail and 13 during escort or at courts.

Another 15 prisoners escaped from custody – four from prisons, eight from “contractor escort”, and three from National Offender Management Service escort, but none involving the most dangerous category of prisoner.

Escapees are pursued by police but prisoners released in error are not considered to be unlawfully at large, according to the Ministry of Justice’s report on the figures.

“They are not culpable and may be unaware that they have not completed their sentence or have outstanding warrant,” it said.

“Depending on the circumstances of the case, they may not be actively pursued for return to custody.”

Liz Truss says 'barking dogs' will stop illegal drone deliveries to prisons

A prisoner is officially classed as having been released in error if they are wrongly discharged from an establishment or court when they should have remained in custody.

Examples of errors can include misplaced warrants for imprisonment or remand, recall notices not being acted on, sentence miscalculations or discharging the wrong person on escort.

Assaults increased to a new high of 26,643 incidents in the year to March 2017, mostly between prisoners but including a record 7,159 attacks on prison staff.

The Liberal Democrats accused the Government of “turning prisons into powder kegs” with “scandalous underfunding”.

Alistair Carmichael, the party’s chief whip, said: “What should be places of rehabilitation are now dangerous hotbeds of violence, self-harm and drug abuse.

“No prison guard should have to go to work in fear of being seriously assaulted while being outnumbered six to one.

“The Government has lost control of our prisons and urgently needs to get a grip.”

About 14 per cent of all assaults were classified as serious, with serious assaults on staff have trebling since 2013 to reach 805 in the year to March.

There were 97 suicides, including six women – a small decrease of 10 from the previous year – but self-harm reached a new record high of 40,414 incidents in the year to March, up by more than 5,700.

The figures showed that self-harm is twice as prevalent in female prisons, but incidents in male-only jails were more likely to result in hospital treatment.

There were a total of 316 deaths in prison custody in the 12 months to June, down from 322 in the previous year, including two murders, 189 deaths due to natural causes and 25 that have not yet been classified.

The Liberal Democrats said the Government has lost control of prisons (PA)

A spokesperson for the Ministry of Justice said the cause of some deaths remained uncertain following toxicology tests and post-mortems, meaning they would not be determined until inquests that can take several months.

The Howard League for Penal Reform said chronic overcrowding and staff shortages were driving a “rising tide of violence, human misery [and] chaos”.

“How many people have to die before action is taken?” asked chief executive Frances Crook.

“The first step to recovery is to recognise that there is a problem. The second step is to do something about the problem.

“By taking bold but sensible steps to reduce the prison population, we can save lives and prevent more people being swept away into deeper currents of crime and despair.”

Almost a quarter of prisoners were being held in conditions officially classified as “crowded” and the number of positive random drug tests reached 9.3 per cent.

The Ministry of Justice said the figure was at its highest level since 2006 “but is predominantly driven by more prevalent cannabis use”.

The report warned of a “resurgence” of the drug, with inmates also taking opiates, like heroin and methadone, and buprenorphine, while new testing is being introduced for new psychoactive substances, formerly known as “legal highs”.

Annual performance rankings show that the number of prisons with the lowest possible rating has risen from six to 10.

The lowest-ranked jails – Bedford, Birmingham, Bristol, Brixton, Guys Marsh, Hindley, Liverpool, Pentonville, Wandsworth and Wormwood Scrubs – are performing at a level that causes “serious concern”.

The Prison Reform Trust said the latest figures showed that the prison system is “nowhere near being safe for those who live and work within it”.

The end of innocence: Inside Britain's child prisons Show all 6 1 /6 The end of innocence: Inside Britain's child prisons The end of innocence: Inside Britain's child prisons A 2006 survey found that 74 per cent of young criminals had a family structure which had broken down The end of innocence: Inside Britain's child prisons Edlington recreation ground, close to where two young boys were attacked in April 2009. Their attackers, two brothers then aged 10 and 11, will be sentenced this week GETTY IMAGES The end of innocence: Inside Britain's child prisons Young blood: a policeman guards the scene in Edlington, South Yorkshire, where the brutal attack on two young boys took place GETTY IMAGES The end of innocence: Inside Britain's child prisons No place like home: a resident at East Moor secure children's home, Leeds The end of innocence: Inside Britain's child prisons Behind closed doors: inmates in secure children's homes and young offenders face a strict routine of education and chores, only earning rewards through good behaviour PA The end of innocence: Inside Britain's child prisons The Attorney General has decided to bring contempt proceedings against individuals who allegedly posted online photographs purporting to show James Bulger killers Jon Venables or Robert Thompson. PA

Peter Dawson, the campaign group’s director, said: “The appalling loss of life and toll of despair requires something more immediate than the promise of more staff and new prisons.

“In the short term, the provision of much cheaper and easier access to a legitimate phone system would make a day to day difference – and provide some consolation to the families of prisoners wondering if their loved ones are safe inside.”

Campaigners and watchdogs have issued a catalogue of warnings about the state of prisons as safety measures have deteriorated.

Last week, Peter Clarke, the chief inspector of prisons, said staffing levels in many establishments are too low to maintain order and described the conditions some inmates are held in as “squalid, dirty and disgraceful”.

Ministers have launched a recruitment drive to add 2,500 frontline officers and put in place new measures to tackle the availability of mobile phones and drugs in jails as part of a reform drive.

David Lidington, the Justice Secretary, said improving safety was his “top priority” after just a month in the post.

“These figures reinforce how crucial it is that we make progress as quickly as possible,” he added.

“As the chief inspector of prisons rightly observed in his annual report last week, we cannot achieve successful reform and rehabilitation unless our prisons are safe and secure – and this is something I am committed to achieving.