UN concerns over Libya militias
Libyan militias are out of control and holding thousands of people in secret detention centres, while the weak interim government struggles to assert its authority, the UN has reported.
The Security Council was told recent violence in Tripoli, Bani Walid and Benghazi highlighted the problem.
More than 8,000 pro-Gaddafi supporters are being held by militia groups, amid reports of torture, UN officials said.
Four died in clashes in Bani Walid, a former Gaddafi stronghold, on Monday.
The UN's Libya envoy, Ian Martin, told the Security Council in New York on Wednesday that those clashes between armed residents of Bani Walid and revolutionaries had been misreported as pro-Gaddafi forces retaking the city.
Nevertheless, he said, it highlighted the challenge of reconciling the former leader's supporters and the rebels that had defeated them.
Militias were responsible for fatal clashes in Tripoli and fighting in other towns this month, he said.
He described that legacy as "weak, at times absent, state institutions, coupled with the long absence of political parties and civil society organisations, which render the country's transition more difficult".
Martin said some steps had been taken towards demobilising ex-combatants.
But the government was struggling to establish its legitimacy, he added, with weapons freely available and various armed brigades having unclear lines of command and control.
While authorities had so far successfully contained any outbreaks of violence, they could escalate and widen in scope, he warned.
UN human rights chief Navi Pillay meanwhile raised concerns about detainees being held by revolutionary forces, saying there were some 8,500 prisoners in about 60 centres.
She urged the authorities to take control of these informal jails, review the cases, and deal with the prisoners in a legal framework.
Libyan Defence Minister Osama al-Juwali, who has been negotiating with militiamen in Bani Walid, told reporters on Wednesday that the situation was stable.
As he arrived, National Transitional Council (NTC) forces - loyal to the new government - gathered outside the town.
Fighters in the town have reportedly expelled NTC forces into the surrounding desert.
Residents have told the BBC that 90% of the town was under militia control.