Armley is a particularly troubled jail in Britain, with violence and self-harm at record levels.

At the prison there was almost one case of a prisoner attacking another prisoner every day on average last year.

That is the conclusion of a major new data investigation into our prison system.

It shows that across English and Welsh jails, inmates are self-harming and attacking each other more than ever before.

Drug abuse is also a serious problem, with more than one in five prisoners failing drugs tests in some institutions.

We took official figures on all these disturbing aspects of life in prison - plus rule-breaking, overcrowding and apparently self-inflicted deaths.

Together they paint a picture of a prison system under serious pressure.

Our data team ranked each prison on each of the indicators, from best to worst.

We used rates for every 100 prisoners to make sure jails were being fairly compared.

The ranks for each category were added up to give an overall ranking for each prison.

HMP Leeds came out 92nd out of 117 in the country.

During the past three years there has been dramatic rise in the level of violence at the prison.

In 2014 there were 135 prisoner-on-prisoner assaults at Leeds, but in 2015 that rocketed to 366 and stayed at 364 in 2016.

The last two years have also seen record totals of violence against staff.

There were 548 cases of self-harm at HMP Leeds in 2016, a record total.

Over the past year, the prison system has been rocked by riots at several different jails, including Birmingham, Swaleside in Kent and the Mount, Hertfordshire.

Meanwhile the rate of prisoner-on-prisoner assaults has gone up by two-thirds between 2013 and 2016.

Frances Crook, Chief Executive of the Howard League for Penal Reform, said: “These figures illustrate the scale of the crisis engulfing the prison system, and they should concern everyone because problems in jails will eventually spill out into the community.

“Allowing the number of people behind bars to grow unchecked, while starving overcrowded prisons of resources, has created a toxic mix of violence, death and human misery. Ultimately, this leads to more reoffending and more people becoming victims of crime.

“With fewer staff available to unlock cell doors and escort prisoners to work, education, training and exercise, prisons have gone into lockdown, with some prisoners held in their cells for 23 hours per day. It is no coincidence that drug use has escalated, and where there are drugs there is debt, and where is debt there is bullying and violence. The way to combat the supply of drugs in prisons is to reduce the demand for them in the first place.

“The government must act now to reduce the prison population and prevent more people being swept into deeper currents of crime and despair.”

A Prison Service spokesperson said: “We know that our prisons have faced a number of long-standing challenges, and it is vital we do everything we can to tackle those issues that undermine security.

“We have implemented a range of measures to increase safety across the estate, including the provision of body-worn cameras and the installation of CCTV, and have taken decisive action to stop the flow of illegal and dangerous contraband”.

“Boosting the frontline is also critical to achieving safety, and have invested £100m to boost the front line by 2,500 prison officers over the next 18 months.”

We calculated these rankings differently from the Ministry of Justice, which runs its own prison rating system using drugs testing rates and other factors.