The UN envoy for Libya said the country has lurched from one emergency to another in recent weeks and warned that the Islamic State extremist group is expanding its operations and Libya could become a refuge for terrorist groups of all persuasions.Ghassan Salame told the Security Council on Wednesday that "the status quo in Libya is untenable."He urged council members to help address the "looming threat" from the spread of extremist groups, and support economic reforms and efforts to advance the political process and move toward national elections.Libya slid into chaos after the 2011 uprising that overthrew long-ruling dictator Muammar Gaddafi and led to his death. The country is currently governed by rival authorities in the capital Tripoli and the country's east, each of which are backed by an array of militias. Other armed groups have carved out fiefdoms across the country, with many profiting from smuggling and extortion.* Sign up to News24's top Africa news in your inbox: SUBSCRIBE TO THE HELLO AFRICA NEWSLETTERFOLLOW News24 Africa on Twitter and FacebookSalame said violence that consumed the capital starting Augustus 26 "shattered the facade of calm that had prevailed in Tripoli since May 2017." Tanks and heavy artillery were deployed in residential neighbourhoods leaving 61 Libyans dead and nearly 160 injured, many of them civilians including children, he said.Tripoli was "on the brink of all-out war" until the UN brokered a fragile cease-fire between the major parties on September 4 which it is now trying to help take root as a first step toward peace, he said."This crisis is but the latest in a series of crises that have engulfed Libya," Salame stressed.He pointed to events in Libya's oil-rich crescent in June and July that "effectively threatened to split the country," the Islamic State's expanding presence and operations, and over 1 000 Chadian government and opposition forces fighting in recent weeks from bases in southern Libya.This risks "the south becoming a regional battleground and safe haven for foreign armed groups," he said.Salame also pointed to hunger strikes in eastern and western Libya by refugees and asylum seekers in detention centres protesting their bleak living conditions.On an upbeat note, he said, "In crisis lies the opportunity to tackle the underlying causes.""To restore stability to Libya there is a strong and urgent need to establish strong and unified civilian and military institutions which work for the benefit of all citizens," Salame said.In May, Fayez Serraj, prime minister of the UN-backed government in Tripoli, and Field Marshal Khalifa Haftar, commander of the self-styled Libyan National Army in the east, agreed on a roadmap aimed at restoring order in the country. It calls for parliamentary and presidential elections, scheduled for December 10.But UN experts said in a report last month that "predatory behaviour" by armed groups in Libya posed a direct threat to forming a national government and ending lawlessness that has fuelled Islamic militancy, human trafficking and instability in the wider region.Salame told the Security Council that "for national elections to take place a number of conditions must be met" which "will require great efforts to achieve - but they are achievable."He was highly critical of the House of Representatives which has failed to deliver on promised legislation for a referendum and elections."They simply have no intention of relinquishing their positions," Salame said. "They have put in place legal provisions to maintain their authority in perpetuity. ... And for the personal ambitions of a few, all Libyan citizens have paid a steep price."He said any rapprochement between the two legislative houses must be directed toward advancing the political process, "not to ensure their own longevity.""If legislation is not produced soon, we will close the chapter on this approach," Salame warned."There are other ways to achieve peaceful political change, and we will embrace them with no hesitation, indeed with enthusiasm," he said, without elaborating.