The military could move into Britain's jails if prison officers take industrial action, the BBC has learned.
Soldiers and RAF personnel are being trained in control and restraint techniques as part of a government contingency plan to deal with a crisis behind bars.
It is understood a number of training bases are being used including the Military Corrective Training Centre in Colchester.
The Ministry of Justice said it had contingency plans in place for every possible eventuality. The Prison Officers Association (POA) said it would "desist and resist" any moves to send the military into prisons.
It cites potential health and safety issues the military would face as "a real danger".
A riot at Ford Open Prison in Sussex and the disturbances at Littlehey prison in Cambridgeshire last month escalated tension between prison officers and management.
'Blatant attack on POA'
POA assistant general secretary Glyn Travis said: "The Prison Service and the National Offender Management Service (Noms) have been doing a number of contingency plans and desktop exercises to ensure that should the POA take industrial action they're going to bring armed forces to take control of prisons.
"We would sooner see the Ministry of Justice sit round the table with the POA and talk about the problems that we face in our prisons.
"The prison population has escalated by almost 1,000 in a month and we believe this money would be better spent to put full staffing in. What we do not want is armed forces going into establishments and endangering themselves.
"Prisoners have always reacted very angrily when the police have gone into establishments and fire and rescue services have come under severe assault. Prisoners see it as an impingement on their rights as much as it is on ours.
"It is a blatant attack by the Ministry of Justice and Noms to try and undermine the freedom of workers to take lawful or any form of industrial action to try to protect their terms and conditions. We don't want to take any form of industrial action but will take all legal steps to prevent the army coming in.
"We believe there is legislation and prison rules that will prevent the army from going in other than to secure a perimeter as the police do when we have a major riot.
Ministry contingency plans
"We will do all in our power to desist and resist the armed forces coming into prison. We believe their health and welfare will be at serious risk should they go into any public sector prison because they will not know how to deal with prisoners who can become very violent."
Juliet Lyon, of the Prison Reform Trust, said: "The service is under considerable pressure because of the cuts.
"It's always been a rather neglected invisible public service, a very important one and it's too easy to think that people will manage to run prisons with very much reduced resources and reduced regimes."
Since the 1980s the military have been involved in prison contingency plans but they have rarely been called on.
In a statement the Ministry of Justice said: "It is obviously important that we have contingency plans in place for every eventuality to ensure we can maintain the security and control of the prison estate."