In the chaotic fallout from Col Muammar Gaddafi's ousting as Libya leader, allegations have swirled that the country's prisons have become hotbeds of abuse and injustice. The BBC's Caroline Hawley in Tripoli meets one civilian who is determined to buck the apparent trend.
Fifty-five-year old Taher Husnein used to live in the Californian city of Sacramento, where he sold cars and volunteered as a Muslim chaplain in jail. Now he runs al-Judaida, one of the biggest prisons in the Libyan capital.
And, in the political and security vacuum that persists in Libya, he is doing it as a volunteer.
Since he turned up at the jail last month and began running it - in an ad-hoc arrangement - he and the men working with him have received no wages.
"I want to help build the new Libya," he says.
"But there is no help from the government. We're not given salaries. I'm asleep for only two or three hours at night, there is so much to do. I've bought shampoo for the inmates out of my pocket."
'Nothing to hide'
Mr Husnein, who was jailed himself in al-Judaida earlier this year after returning to Libya, says he has stamped out abuses that had been taking place in the prison.
"We kicked the people who were doing that out," he told the BBC. "I was not going to tolerate that. This should be a civilised place. You are free to look around. We have nothing to hide."
Among about 1,000 inmates in al-Judaida, a former pilot for an oil company, Jumaa Saleh, described being blindfolded and given electric shocks throughout the night when he first arrived in the jail, before Mr Husnein took over.
Detainees confirmed that the torture had now stopped in al-Judaida. But it is only one of several jails in Libya, which are currently under the control of an array of different military councils and brigades.
And Amnesty International has described "widespread" abuses over the past few weeks.
The group says that in one detention centre its researchers heard the sounds of whipping and screams. In another, there was a wooden stick, rope and rubber hose.
"These detainees have in most cases been arrested without a warrant, beaten - and sometimes worse - on arrest and arrival in detention," says the group's Hassiba Hadj Sahraoui.
"They are vulnerable to abuse by armed militias who often act on their own initiative."
One Tripoli resident, a black Libyan who was too frightened to reveal his identity, told the BBC that armed militiamen had put cigarettes out on his back and leg because his Tawargha tribe supported ousted leader Col Muammar Gaddafi.
"I am not a soldier. I had nothing to do with the war. And now I'm terrified," he said.
Acting justice minister Muhammad al-Alagi has promised to investigate, blaming the problem on the lack of central control.
"I can assure you that these things are not organised. Maybe the abuses are the actions of individuals, not more," he said.
"Our revolution was carried out because we want human rights, so we cannot permit these things."
In al-Judaida, inmates pressed their faces to the bars of their cells to tell their stories.
"Only 1% of the people in here are guilty," said one detainee.
"The people who are really guilty have all fled. We've all been rounded up because they think we supported Gaddafi. But everyone had to support Gaddafi."
Another man said he had been detained because pro-government militias were looking for his brother who had served as a soldier. One was picked up after a picture of Col Gaddafi was found under his car seat.
Another said he had simply been caught up in a private vendetta.
"They have done no investigation, nothing," he said, with tears rolling down his face.
"I want to go home."
Mr Husnein acknowledges that some of the inmates are innocent of any crimes.
Among them are hundreds of Nigerians and other Africans - men and women - who had been detained because they did not have the right paperwork to stay in Libya.
"Please, please do something to help us," begged a desperate woman, Olichi Dioka.
Amnesty International has acknowledged the major challenges facing Libya's new authorities.
But it has urged them to ensure that continued abuse does not "stain the new Libya's human rights record".