Media playback is unsupported on your device Media caption Undercover footage shows prisoners incapacitated by drugs

Chaos in one of the biggest prisons in the country has been revealed in secret filming for the BBC.

An undercover reporter spent two months at HMP Northumberland, which houses up to 1,348 male inmates, for Panorama.

He discovered widespread drug use, a lack of control, door alarms that did not go off in one block and a hole in an internal security fence.

The Ministry of Justice said it would investigate the "extremely serious allegations" at the Acklington jail.

Wire-cutters

Prison officers also found balaclavas, blackout clothing and wire-cutting tools at the category C jail.

It is believed inmates had been sneaking out to collect drugs or other contraband thrown over the perimeter fence.

These discoveries were made in a block where inmates preparing to transfer to open prisons were not locked in their cells at night.

In one of the most disturbing episodes of the undercover investigation, footage shows a prison officer having convulsions on the floor after accidentally inhaling spice, a cheap and stronger synthetic alternative to cannabis, which is rife in the jail.

What is going wrong with the prison system?

Put prisoner safety first, charities say

Prison suicides rise to record level

Media playback is unsupported on your device Media caption BBC Panorama spent two months inside one of the country's biggest prisons

The undercover reporter, who was working as a custody officer, was told by some staff they did not feel able to confront prisoners because they were worried back-up support would take too long to arrive.

During the secret filming, the reporter also recorded scenes including:

Prisoners incapacitated by drugs

Officers sometimes left on their own to manage large groups of inmates

Inmates threatening staff

Image caption A prison officer collapsed after accidentally inhaling spice smoke

The Panorama investigation comes days after the Ministry of Justice announced the replacement of the National Offender Management Service with a new prison and probation service aimed at cutting crime and reforming offenders.

200 jobs cut

HMP Northumberland is run by Sodexo Justice Services.

It was privatised in 2014, when the government was aiming to cut £500m from the prisons budget.

To win the contract, Sodexo pledged to save the taxpayer £130m over 15 years. Two hundred jobs, including 96 prison officer posts, were cut.

At the time of the deal, the Prison Officers Association warned it could result in "escapes and riots".

Find out more

Read Prison Undercover: Reporter Joe Fenton's story:

It didn't take too long to realise the inmates were, in effect, running this prison

HMP Northumberland is a training prison that is meant to offer a range of education and training programmes to prepare inmates for release.

The Panorama reporter witnessed some inmates colouring in pictures of the children's cartoon character Peppa Pig in an "employability skills" class provided by an outside contractor, Novus.

It told Panorama it had investigated these concerns and sent a report to the government.

The plain truth is that there are too few prison officers Sir Martin Narey, Former Prison Service head

The president of the Prison Governors Association, Andrea Albutt, told the BBC previous staff cuts were behind the loss of control.

She said: "The situation is that there are so few prison officers at the moment - that their confidence has been affected and we have a more violent prison population."

Good quality staff-prisoner relationships, which yielded intelligence, had been hit by the lack of staff, she said.

The Ministry of Justice told the BBC: "The justice secretary has been clear that levels of violence and self harm in our prisons are too high, which is why we are investing an extra £100m annually to boost the front line by 2,500 officers.

"These are longstanding issues which will not be resolved in weeks or months but we are determined to make our prisons places of safety and reform."

'Proud of staff'

A spokesman for Sodexo said: "We are proud of those staff at HMP Northumberland who do a professional job in such difficult circumstances.

"Security and the safety of our prisoners and staff are our top priority, which is why we have made significant investments in these two areas over and above the contract requirements."

As part of the investigation, Panorama analysed what prisoners had been saying about safety in prisons across England and Wales.

Panorama took HM Inspectorate of Prisons data on prisoners' perceptions and analysed it to reveal how fears have changed over the last decade.

Image caption The data shows that since 2011, there has been a rising trend in the percentage of prisoners who feel that it is easy to get illegal drugs, while the rate of those feeling unsafe also rose between 2011 and 2016.

Image caption In the five jails with the highest scores for perceived availability of drugs, at least 60% of inmates said they were easily obtainable

Image caption The prison perceived to be the least safe is Swaleside in Kent, where 69% of inmates reported concerns to HM Inspectorate of Prisons in a report last year

Image caption Pentonville in north London scored the lowest on availability of prison work in an HMIP survey from two years ago

The calculations are a snapshot of what inmates said was happening at the time of the inspection.

Not every jail is inspected every year and conditions can change rapidly if a new regime or resources are introduced.

Sir Martin Narey, former head of the Prison Service and now a non-executive member of the Ministry of Justice's board, said: "The plain truth is that there are too few prison officers.

"If that reduction in number leads to a lack of confidence, then the great danger is some officers have retreated from interaction with prisoners to the ends of wings.

"That's very dangerous for the sort of prison service that we want."

'Disorder reflects anger'

Sir Martin believes that Justice Secretary Elizabeth Truss's pledge to recruit more officers would make a difference.

"We need to concentrate on recovering their confidence," he said.

"The disorder we've seen more recently reflects prisoner anger about reductions in regime."

"If you take people and lock them up and don't use that period to try to do something, then we're just losing a golden opportunity."

This was echoed by the Conservative MP and former prisons minister Crispin Blunt, who said: "We have got to get to a place where prison is used as a place to turn people around."

Watch Panorama Behind Bars: Prison Undercover on Monday 13 February at 20:30 GMT on BBC One. Or catch up on iPlayer.