Tribal, regional and linguistic differences in Libya have made the transition to democracy since the overthrow of dictator Muammar Gaddafi in 2011 very difficult.
Fighting regularly breaks out between forces loyal either to the United Nations-backed Government of National Accord (GNA) or the House of Representatives, led by rebel general Khalifa Haftar, and based in Tobruk, in the east of the country.
But the latest clashes over control of the strategically-important capital, Tripoli, have been particularly violent and led to international condemnation.
What is happening right now?
The UN's Support Mission in Libya has called for an urgent meeting on Tuesday in Tripoli between the various concerned parties to discuss security in the capital.
It comes after more than a week of heavy fighting, two truce agreements that were then near-immediately violated and the implementation, on Sunday, of a state of emergency.
Some 400 inmates escaped on Monday from the Ain Zara prison as rival militias fought near the facility. The airport has also been hit by shellings and the World Health Organisation reported that some health care facilities have been attacked.
At least 47 people have died and a further 130 were wounded, according to the country's health ministry.
Who are the key players?
The clashes oppose the Seventh Bridage — a militia from Tarhuna, a city some 90kms southeast of Tripoli — and Tripoli armed groups linked to the interior ministry.
The reason for the fighting is unclear although both sides accuse the other of corruption and say they aim to bring back order.
What is the international community saying?
France, Italy, the United Kingdom, and the United States issued a joint statement on September 1 to "strongly condemn the continued escalation of violence in and around Tripoli."
"We urge armed groups to immediately cease all military actions and warn those who tamper with security in Tripoli or elsewhere in Libya that they will be held accountable for any such actions," the statement also said.
The EU's top diplomat, Federica Mogherini, also called for a return to calm, reaffirming the bloc's ambition to work with the different actors to strengthen Libya's sovereign institutions, help organise elections — scheduled for later this year — and create professional security forces under civilian control.
"The European Union calls on all legitimate Libyan actors to rally together in support of these goals and put the interests of the Libyan people first," Mogherini said in her September 3 statement.
Maria Ribeiro, the UN humanitarian coordinator in Libya, called on all parties to resume peace talks and "refrain from the use of indiscriminate weapons in residential areas."
"Families in Tripoli are living in fear due to indiscriminate shelling landing in their neighbourhoods from afar with no knowledge of who is behind these attacks and where they are coming from."
What are the implications for the migration question?
Italy, supported by the EU, has a deal with Libya to train the North African country's coastguard to intercept migrant boats in the Mediterranean heading for mainland Europe. Once intercepted, the migrants on board are then brought back to Libya and held in facilities, including detention centres.
A UN report last year blasted the deal as "inhuman" and aid organisation Medecins Sans Frontieres (MSF) warned that the latest bout of fighting is further endangering the lives of about 8,000 refugees, asylum seekers and migrants held in detention centres.
"These people are already extremely vulnerable, and now they find themselves trapped in yet another conflict without the ability to escape," MSF's head of mission in libya, Ibrahim Younis, said.
"They should not be held captive simply because they were looking for safety or a better life. They should be immediately released and evacuated to a country where they will be safe," he added.