Torture and brutality are widespread in Libyan prisons run by various militias two years after the overthrow of leader Muammar Gaddafi, according to a United Nations report.

About 8,000 prisoners are held without trial in government jails on suspicion of having fought for Gaddafi, while countless others are detained by militias out of sight and in primitive conditions, the report, released on Tuesday, said.

"Torture and ill-treatment in Libya is an on-going and widespread concern in many detention centres," said the report, released jointly by the UN Support Mission in Libya (UNSMIL) and the Office of the UN High Commissioner for Human Rights.

UN investigators, who had periodic access to various detention centres, said there was evidence that 27 people have been tortured to death in the prisons, 11 of them this year, according to the report.

The report said that the problem is rampant in jails run by militias that triumphed in the eight-month civil war in 2011.

“In some cases, members of the armed brigades freely admitted, and even tried to justify, the physical abuse of detainees,'' the report said.

No one was immediately available for comment from the Libyan government.

'Torture will become institutionalised'

The report noted the Libyan government had declared its commitment to ending torture and to ensuring the proper working of the country's criminal justice system, and praised its passage of a law making torture a criminal offence.

Torture and ill-treatment in Libya is an on-going and widespread concern in many detention centres. UNHCR report

But both UN bodies feared that unless firm action was taken "there is a danger that torture will become institutionalised within the new Libya".

Many arrests were arbitrary, motivated by personal or tribal score-settling, the report said.

The paper detailed cases of men, some hauled off the street on the way to work or in their homes without explanation by militiamen, and how they were beaten and raped with bottles or large bullets and left without food in filthy jails.

In government-controlled jails run by trained police or prison officers, which UN staff had been able to visit, conditions and the treatment of detainees was better than in those operated by the militias - to which they had had little access.

In the latter, it said, torture was most frequent immediately upon arrest, and then - as in Gaddafi's time - detainees were held without access to lawyers and with only sporadic visits by their families.

A tribal group near Zintan in south-western Libya is holding Gaddafi's son and one-time political heir Saif al-Islam and has rejected a government request to transfer him to a Tripoli jail.