* Many held by militias defying government - U.N.
* Many arrests arbitrary, settling personal scores - report
* No immediate comment from Libya
By Robert Evans
GENEVA, Oct 1 (Reuters) - Torture and brutality are rife in Libyan prisons two years after the overthrow of leader Muammar Gaddafi in a revolution launched under the banner of freedom and justice, a U.N. report said on Tuesday.
Around 8,000 prisoners are held without trial in government jails on suspicion of having fought for Gaddafi, while countless others are detained by freelance militias out of sight and in primitive conditions, it added.
No one was immediately available for comment from the Libyan government.
"Torture and ill-treatment in Libya is an on-going and widespread concern in many detention centres," said the report from the U.N.'s top human rights office (UNHCHR) and the world body's Support Mission (UNSMIL) in the country.
UNSMIL had recorded 27 cases of death in detention, almost certainly caused by torture, since Gaddafi was captured and killed, it said. Eleven of these were this year and all in prisons controlled by militias, it added.
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.
But both U.N. 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 U.N. 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.
The best-known prisoner held by Libya's militias is Gaddafi's son and one-time political heir Saif al-Islam. His captors, a tribal group near Zintan in south-western Libya, have refused government demands to deliver him to a jail in Tripoli.
(Reported by Robert Evans; Editing by Andrew Heavens)