New evidence has emerged that supporters of the former Libyan leader, Col Gaddafi, have been tortured while in detention.
The BBC has been told by inmates at a jail in Misrata that they were beaten, whipped and given electric shocks.
The head of the city's military council has dismissed the allegations.
United Nations human rights chief Navi Pillay has called on Libya's transitional government to take full control of all prisons.
The allegations come exactly 100 days after Col Gaddafi's violent death at the hands of former rebels.
Earlier this week the medical charity Medecins Sans Frontieres said it was suspending its work in one Misrata detention centre because of an alarming rise in torture cases.
The BBC's Gabriel Gatehouse managed to get access to that prison.
Inmates told him they had been subjected to prolonged beatings and were whipped with electric cables.
None of the alleged abuse occurred at the prison itself.
"I was taken for questioning at a site used by the national army," said one man who wished to remain anonymous.
"My leg was already in a state when they took me away. As they interrogated me they kept on beating me on my leg and so it got even more swollen," he said.
In other cases prisoners said the abuse had occurred before they had arrived at the jail.
International human rights groups have said such incidents are widespread in Libya.
"The torture is being carried out by officially recognised military and security entities as well as by a multitude of armed militias operating outside any legal framework," a spokesman for London-based Amnesty International said on Friday.
The people running the Misrata detention centre told the BBC they were aware of inmates being taken away to be tortured, but were powerless to stop it.
Many detention centres are controlled by militias unaccountable to the government.
Navi Pillay expressed concern on Friday about the treatment of prisoners, but especially sub-Saharan Africans who the militias assume to have been fighting for Col Gaddafi.
"There's torture, extrajudicial executions, rape of both men and women," she told the Associated Press news agency.
"Something has to be done immediately to assist the authorities, for the state to take control of these detention centres," she said.
The head of Misrata's military council, Ibrahim Beitelmal, denies involvement in any abuses and says his accusers have a hidden agenda.
"I think that the people working under the guise of human rights organisations or doctors without borders are Gaddafi's fifth column. There may have been a few cases of former rebels taking revenge but that doesn't mean that the orders have come from my office to torture prisoners."
The United Nations estimates that about 8,500 people - most accused of being Gaddafi loyalists - are being held in prisons across Libya.