Jack Straw: "It was a disgraceful matter in both its intent and execution"
The justice secretary has ordered an inquiry into whether moving out "difficult" inmates before inspections is widespread in the prison system.
Jack Straw took the step after five prison managers were accused of moving vulnerable inmates between two London jails to "manipulate" inspections.
Inspectors said staff at Wandsworth and Pentonville had switched inmates, two of whom later harmed themselves.
Brixton prison is also under investigation, Mr Straw told MPs.
Chief Inspector of Prisons Dame Anne Owers published details of the incidents in two reports.
The chief inspector's reports have highlighted practices in two prisons which are quite clearly reprehensible and neither justifiable nor excusable
Jack Straw, Justice Secretary
The five prison managers are facing gross misconduct charges.
Union representatives said the claims were overshadowing "enormous progress". Some have said the tactics were "inevitable" because of budgetary pressures.
The Howard League for Penal Reform has questioned how many other jails are using similar ploys, but the prison authorities deny the practice is widespread.
Mr Straw told the Commons the transfer of prisoners before inspections was a "disgraceful matter".
In an earlier written statement he said he had asked Dame Anne to work with the Ministry of Justice's director of analytical services to find out whether "the temporary transfer of prisoners prior to inspection is more widespread across the estate".
Gaetan Portal, BBC News
Why would two highly regarded prison governors have been complicit in moving around - or "ghosting" - prisoners ahead of inspections?
If it was to burnish the reputations of their establishments and "cheat" the inspectors, it was doomed to failure.
The prison system in England and Wales allows prisoners to communicate in confidence with inspectors - and some did.
In any case, there is agreement that the presence of those inmates would not have affected the final inspection reports.
Some governors complain they are "over inspected" and that performance targets place them under enormous stress.
Meanwhile, reform groups argue that all inspections should be unannounced - but already half of the 61 undertaken annually are.
The irony is that, without the scandal, Wandsworth and Pentonville would be a credit to a prison system battling overcrowding and dealing with some of society's most disturbed people.
"The chief inspector's reports have highlighted practices in two prisons which are quite clearly reprehensible and neither justifiable nor excusable.
"Those involved neglected one of their primary duties - to treat prisoners with decency and respect," he said.
Mr Straw also told MPs there was no evidence to suggest prison overcrowding or targets were factors in the transfer of the prisoners.
The actions of the governors at both jails at that time, both of whom have since moved to new positions, are under scrutiny along with those of three other senior managers.
Dame Anne said she had come across "irresponsible, pointless and potentially dangerous" prisoner swaps conducted earlier this year, shortly before teams from the Prisons Inspectorate arrived at the jails.
Five prisoners were moved from Wandsworth and six from Pentonville before the inspections in May and June respectively.
Dame Anne told BBC Breakfast the moves at the two prisons "definitely" led to two prisoners harming themselves.
The prisons ombudsman is separately investigating the apparent suicide at Wandsworth of another prisoner, Christopher Wardally.
Prison Service chiefs say his temporary move to Pentonville was not part of the swaps, but the timing of Wandsworth's inspection may have been a factor in his delayed return.
The moves involved:
• Six Pentonville prisoners being taken from the vulnerable inmate unit
• Two swapped Wandsworth inmates missing medical appointments for serious conditions
• One bloody inmate, injured from a self-inflicted ligature wound on his neck, being taken from his cell in just his underwear
• The same prisoner attempting to harm himself three more times at Pentonville
Dame Anne Owers: "It is potentially very damaging to prisoners"
• Moves being sanctioned despite risks of suicide
"The presence of those prisoners wouldn't have affected our inspectors assessment at all," said Dame Anne.
"Sadly for the many staff and managers who had worked hard to improve the two prisons, their efforts will inevitably be overshadowed by these events," she said.
"This is deplorable, not only because of the effects on individuals, but because of the underlying mind-set that prisoners are merely pieces to be moved around the board to meet performance targets or burnish the reputation of the prison."
Earlier, Mr Straw said a departmental investigator was now looking at all transfer logs between prisons classified as local.
"This data should give a clear indication of any short-term transfers out and back to prisons around the time of inspections," he said.
These were good governors at Pentonville and Wandsworth - if people like that are being forced to do bad things, what else is going on?
Frances Crook, Howard League for Penal Reform
Phil Wheatley, director general of the National Offender Management Service, said the transfers had been completely unacceptable and without any legitimate reason.
"That the purpose of this practice was to seek to manipulate the... inspection process is reprehensible," said Mr Wheatley.
He had never come across similar practices, which amounted to "complete folly" because they were so easily discovered, he added.
However, Howard League for Penal Reform director Frances Crook said, with record numbers behind bars at a time of reduced budgets, the prisons were "in crisis".
"These were good governors at Pentonville and Wandsworth. If people like that are being forced to do bad things, what else is going on?"
The Prison Governors Association, which represents senior managers within the service, said it was regrettable the story was eclipsing "enormous progress" that had been made at the two sites.
"The association believes that, in common with other senior public servants, the current target culture places excessive pressure on prison governors at a time when budgets are being cut."
Prison Officers Association general secretary Brian Caton agreed governors were under pressure to "cut corners".
Juliet Lyon, director of the Prison Reform Trust charity - which aims to monitor jail conditions - said the reports raised "stark questions about whether all future prison inspections should be unannounced".
Do you work in an organisation that is faced with inspections? Send us your comments and experiences in connection with the story above.
A selection of your comments may be published, displaying your name and location unless you state otherwise in the box below.
The BBC may edit your comments and not all emails will be published. Your comments may be published on any BBC media worldwide.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.