Staff at one of South Africa's most dangerous prisons, run by British firm G4S, have been accused of "shocking" abuses and of losing control.
The South African government has temporarily taken over the running of Mangaung prison from G4S and launched an official investigation.
It comes after inmates claimed they had been subjected to electric shocks and forced injections.
G4S says it is investigating the allegations.
The BBC has obtained leaked footage filmed inside the high security prison, in which one can hear the click of electrified shields, and shrieking. It also shows a prisoner resisting a medication.
Researchers at the Wits Justice Project at Wits University in Johannesburg say they have collected accounts of electric shocks and beatings from almost 30 prisoners during a year-long investigation.
"Some said they would pass out when the shocks became too intense," said Ruth Hopkins, a journalist with the Wits Justice Project.
She said inmates also complained about suffering broken limbs and other serious injuries.
One former prisoner told the BBC electric shocks were used as "torture", while a sacked security guard said water was thrown over inmates to increase the impact of the charge.
A lawyer for some of the prisoners has condemned a culture of impunity amongst prison staff, according to the BBC's Africa correspondent Andrew Harding.
G4S has blamed an upsurge of violence at the prison on a labour dispute, our correspondent adds. More than 300 guards there were sacked this month after going on an unofficial strike.
Nontsikelelo Jolingana, the acting national commissioner of the Department of Correctional Services, told the BBC her department had launched a formal investigation into the claims of abuse.
The South African prison authorities announced last month they were temporarily taking over the running of the prison near Bloemfontein, in the central Free State province, after the private security contractor "lost effective control of the facility".
Andy Baker, regional president of G4S for Africa, said administering and prescribing injections was not the domain of G4S staff, but of independent medical staff.
When asked about allegations of electric shocking and beatings, he told the BBC there had "never been an abuse of this type or nature" to his knowledge.
In a statement to the BBC, G4S said while the video could not be verified, the company "takes such allegations very seriously and will be launching our own investigations into the matter".