Up to 6,000 Libyans are detained in facilities run by revolutionary brigades that helped oust Moammar Gadhafi, the United Nations said Wednesday. It urged Libya to hurry its process of putting those facilities under government control. The top UN envoy to Libya, Ian Martin, told the Security Council that Libyan authorities recognize that their main challenge is to address the wide circulation of weapons in the country and the future of the revolutionary fighters, and to develop professional state security institutions under civilian control. Eight detention centers with a total of 2,383 detainees have been placed under government control so far. The fighters helped oust Moammar Gadhafi after more than four decades of his control. Libya celebrated the first anniversary of the start of its revolution on Feb. 17, but Martin said it has had a government for only three months. The country is preparing for elections in June for a 200-member assembly that will appoint a prime minister and select a panel to write the constitution. The key to successful elections, Martin said, is “a positive evolution of the security situation.” More broadly, he said, “the new government faces tremendous challenges and a heavy legacy from the former regime as it tries to tackle illegal migration and smuggling, effective border control, proliferation of weapons and the need to reverse policies of long-standing discrimination against minority communities and foster national reconciliation among tribes.” Martin said there is little indication that the brigades want to stay outside state authority. When a government decision last week transferring control of land, air and seaport infrastructure from the brigades to the Ministry of the Interior is implemented, it will be “a significant step forward in exerting state control,” he said. Martin said the registration process for ex-combatants that began in January is nearing completion, with approximately 148,000 former fighters registering to date. He said about 15 percent appear to be choosing to join the army, and a similar percentage want to join the police.