About 3,000 police and soldiers firing automatic weapons stormed Pavon prison outside the town of Fraijanes near the capital Guatemala City, retaking a jail controlled since 1996 by a committee of inmates.
An "order committee" of hardened criminals including convicted murderers and rapists had ruled Pavon through extortion and punishment of prisoners who disobeyed them, Interior Minister Carlos Vielmann said.
The inmates bribed the perimeter guards and smuggled in food, drink, luxury goods and materials to process hard drugs, some of which were sold outside, Mr Vielmann said.
"It was a complete tyranny inside the jail," said Mr Vielmann, who with help from the army and police coordinated the recapture of the prison - a sprawling complex with bars and barber shops, where some inmates had their own houses.
North Pole punishment
Prisoners who rebelled were beaten or confined without food or water in small isolation cells for weeks, prison director Alejandro Giammattei said.
He said they were sometimes stripped naked or doused with freezing water in a section known as the "North Pole".
The leaders forced prisoners to bring in wives or daughters for sexual favours, even building a makeshift brothel on the grounds, said Mr Giammattei.
Officials suspect some prisoners who refused to comply with extortion demands may have been killed and buried in clandestine graves.
Forensic anthropologists, experts in exhuming mass graves from the country's civil war, have surveyed the grounds.
Pavon's inmates were transferred to a nearby prison and newspaper reports say some have tried to attack members of the committee in revenge for years of abuse.
Human rights activists say the government is exaggerating conditions inside Pavon to justify a heavy-handed storming of the prison in which seven inmates died, among them convicted murderer Luis Alfonso Zepeda, who led the order committee.
