The power grab highlights the lawlessness that has swept Libya since rebels overthrew dictator Moammar Gadhafi in 2011 and later formed powerful militias that successive governments have been unable to tame. It also leaves troubled Libya with two governments and two parliaments, deepening divisions and escalating the political struggle that's torn the country apart.
Islamist militias have attempted to cement their power in the capital after claiming its airport and forcing rival militias to withdraw. The fighting began after Islamist candidates lost parliament in June elections and a renegade general began a military campaign against Islamist-allied militias in Benghazi, Libya's second-largest city.
The Islamist-led past parliament voted unanimously to appoint a new "national salvation government" headed by Omar al-Hassi, a university professor. That happened as Islamist-militias said in a statement that their forces had "liberated" all facilities and barracks in Tripoli, inviting the United Nations and foreign diplomats to return.
Libya's newly elected parliament meanwhile continues to meet in the far eastern city of Tobruk far from the militia violence. Those lawmakers have branded Islamist militias as terrorists, sacked the country's chief of staff over his alleged links to Islamists and named a new one who vowed Monday to wage war against "terrorists."
Libya's interim government is also unable to return to the capital and has been holding its meetings in the eastern city of Bayda. It sent its foreign minister to Egypt to meet officials from neighboring countries to discuss ways to stop the spiraling violence.
The meeting ended with calls for disarming the militias and opposition to outside military intervention in Libya's affairs. That appears to be an attempt to mute accusations that Libya's neighbors, including Egypt, played a role in recent unclaimed airstrikes that have targeted Islamist militias' positions in Tripoli.
Egypt's Foreign Minister Sameh Shukri warned the gathering that the situation in Libya threatens the entire region and other parts of the world.
"The developments in Libya have left an impact we have felt on the security of neighboring countries, with the presence and movement of extremist and terrorist groups whose activists are not only limited to the Libyan territories but also spill over to neighboring countries," he said.
Meanwhile, France, Germany, Italy, the United Kingdom and the United States issued a joint statement to "strongly condemn the escalation of fighting and violence" and urged "all parties in Libya (to) accept an immediate ceasefire and engage constructively in the democratic process, abstaining from confrontational initiatives that risk undermining it."
Also on Monday, retaliatory attacks swept Tripoli, targeting houses and buildings of Islamist rivals, including Prime Minister Abdullah al-Thinni. He accused Islamists of attacking his house in Tripoli, then torching and looting it.
"It is impossible that you can impose anything on Libyans using force," al-Thinni warned. "It will be like a devil who wants to enter heaven."
Libya's divisions are rooted in rivalries between Islamists and non-Islamists, as well as powerful tribal and regional allegiances between groups who quickly filled the power vacuum after Gadhafi's fall. Successive transitional governments have failed to control them.
The formation of a new government by the Islamist-dominated outgoing parliament came on the grounds that handover of authority earlier this month was improperly handled. However, Libya's court system and laws remain in disarray, meaning whomever has the guns has the power.
The political rivalry has been coupled with militia infighting that has scarred the capital and driven out thousands of its residents. It has also turned Benghazi into a battlefield between Islamist militias and fighters loyal to a renegade army general who vowed to weed them out.