Libya has lurched ever closer to fragmentation and civil war this weekend after Islamist-led militias seized the airport in the capital, Tripoli, proclaimed their own government, and presented the world with yet another crisis.

Operation Dawn, a coalition of Islamist and Misrata forces, captured the airport on Saturday in fierce fighting against pro-government militias after a five-week siege that battered parts of the capital.

Television images from the scene showed jubilant, bearded, militias dancing on wrecked airliners, firing machine guns in the air and chanting "Allah O Akbar" ("God is great").

On Sunday, they set airport buildings ablaze, apparently intending to destroy rather than hold the site.

The victory, which secures Islamist control over Tripoli, was a culmination of weeks of fighting triggered by elections in July, lost by Islamist parties.

Rather than accept the elections result Islamist leaders in Libya accused the new parliament of being dominated by supporters of the former dictator Muammar Gaddafi, and have sought to restore the old national congress.

"The general national congress will hold an emergency meeting in Tripoli to save the country," said Omar Ahmidan, a congress spokesman.

Libya's official parliament, the house of representatives, in the eastern city of Tobruk, denounced the attack as illegal, branding Dawn a "terrorist organisation" and announcing a state of war against the group. The move leaves Libya with two governments, one in Tripoli, and one in the east of the country, each battling for the hearts and minds of the country's myriad militias.

There are few regular forces for the government to call upon. The prime minister, Abdullah al-Thani, needs to persuade nationalist and tribal militias to try to recapture the capital. Dawn militias are consolidating their hold on the capital by rounding up government sympathisers and people from Zintan, whose militia defended the airport.

"Units from Gharyan and Abu Salem are circling the area looking for any Zintani they can find," said one frightened resident hiding at an address in the city.

Fighting is continuing to the west of Tripoli, while Islamist brigades in Benghazi, 400 miles east, are battling with army units and nationalist militias of the former general Khalifa Hiftar.

The weekend's developments threaten to tilt the country across the line from troubled post-Arab spring democracy to outright failed state.

Egypt and Sudan are known to be watching developments closely, and last week the French president, François Hollande, said that despite the crises in Iraq, Syria, Ukraine and Gaza, his "biggest concern at the moment is Libya".

Some officials in neighbouring countries fear militants could use planes at the three airports Dawn now controls for terror attacks on surrounding nations.

Those fears were heightened after Dawn officials vowed retaliation against Egypt and the United Arab Emirates, whom they blame for air strikes by unidentified jets, Saturday morning, which killed 17 Misrata militias.

"The Emirates and Egypt are involved in this cowardly aggression, we reserve the right to respond at the opportune moment," said Ahmed Hadia, a spokesman for Dawn.

Reports from Italy say Rome is working with the US, France and other nearby states to launch precautionary exercises. Algeria has deployed air defence missiles on its border while Egypt and Tunisia have banned flights from west Libya airports.

The security situation has become so parlous in Libya that the nation has been forced to withdraw as host for the African Cup of Nations in 2017.

Libyan officials have arrived in Egypt before a summit in Cairo on Monday at which they are expected to appeal for military support. Libya's foreign minister, Mohamed Abdul Aziz, launched a similar appeal at the UN in July, but found no support, with diplomats wary about new foreign intervention.

Dawn leaders insist they are not extremists, characterising themselves as patriots ensuring that the gains of the 2011 revolution are not lost.

Many Libyans think fragmentation is now inevitable, with Islamist-led forces strong in Tripoli, and tribal and nationalists dominant in the east of the country.

"It's gone into complete madness," said Hassan el Amin, a Libyan politician who fled to Britain after receiving death threats from Misrata militias. "There's another battle coming up, between east and west."

The key to victory could be as much economic as military. Libya's government might have lost control of the capital but for the moment it has international recognition, ensuring access to the country's rich oil reserves and foreign assets, worth an estimated £80bn.

French diplomats say that in the present power struggle involving rival armed factions, the UN security council should take a leading role to forge a political solution and prevent the country from splitting apart.

France sent two frigates to Tripoli to evacuate the remaining French nationals from Libya on 29 July. Forty-seven French nationals and a number of Britons were evacuated secretly in the night-time operation.

But experts say military intervention in Libya, at this time either by France or within a Nato coalition, looks unlikely.

Camille Grand, director of the Fondation pour la Recherche Stratégique, said: "Nato's got its hands busy with Ukraine. And in France, everyone's looking at Iraq, Syria and the Sahel.

"Who would be the driving force? And what would be the trigger now that French nationals have been evacuated? There aren't any volunteers to get involved in a quagmire that looks like Somalia now."