Libya's struggling elected government and representatives of 15 neighbouring nations have unanimously rejected the idea of military intervention as a way to restore stability in the oil-rich North African nation, which some say is on the brink of civil war.

Meeting in Madrid on Wednesday, officials from countries surrounding Libya and to its north across the Mediterranean concluded "there is no military solution to the current crisis".

Libya currently has two competing parliaments and governments.

The government and elected House of Representatives last month relocated to Tobruk after an armed Islamist group from the western city of Misrata seized the capital Tripoli and most government institutions, as well as the eastern city of Benghazi.

The rival previous parliament remains in Tripoli and is backed by Islamist militias.

Legislators' threat

The conference began as Libya's acting prime minister sought to reassert his authority by naming a new cabinet and some legislators threatened to veto his choices.

Abdullah al-Thinni's administration, functioning from Tobruk, has failed to control militias and Islamists who backed the rebellion to toppled long-time ruler Muammar Gaddafi in 2011, then kept their weapons and started to stake claims on territory, oil and other resources.

Politicians said he asked parliament to approve a new 16-strong cabinet, including Farida Allaghi, a human-rights activist, as foreign minister - his first new government since he was re-appointed as acting premier earlier this month.

Live Box 2014526124723906113

Speaking at the Madrid conference, Jose Manuel Garcia-Margallo, Spanish foreign minister, said that the status quo puts Libya in a position where it could slide into a Syria-style civil war.

Mohamed Abdulaziz, Libya foreign minister, offered no specifics on how his government could regain control of Tripoli but said he did not believe a recent series of mysterious air strikes in Libya or future air strikes would shift the balance of power.

"We are convinced that is impossible for us to overcome terrorism only through air strikes," Abdulaziz said in Madrid.

US officials have said some air strikes were carried out by Egypt and the United Arab Emirates, reinforcing the perception that Libya has become a proxy battleground for larger regional struggles - with Turkey and Qatar backing the Islamist militias and Egypt, Saudi Arabia and the UAE supporting their opponents.

The spectre of regional intervention has cast a pall over the increasingly fractured country, which was plunged into turmoil following the 2011 NATO-backed uprising that toppled Gaddafi but gave rise to a patchwork of heavily armed and increasingly unruly militias.

Abdulaziz said his government is "not inviting any country to do any kind of military intervention in Libya. What we have seen is foreign intervention has always lead to disaster".

Question of impact

Al Jazeera's Stefanie Dekker, reporting from Madrid, said the conference was unlikely to lead to reconciliation among the warring sides.

"It is very difficult to see how they can achieve something here that is going to have a real impact on the ground especially because the government in Tripoli, the opposition, is not here. They [Tripoli government] does hold sway and has strong militias," she said.

Heavy clashes broke out on Tuesday between former General's Khalifa Haftar's forces and Islamist fighters in Benghazi, claiming several lives, medics said.

Nine soldiers were killed and 30 others were wounded when the Islamists made a new push to approach the airport, a hospital medic said.

"We are still controlling the airport," Saqer al-Jouroushi, Khalifa Haftar's air defence commander, told Reuters news agency, adding that his troops had managed to ready four Gaddafi-era helicopters and four MiG fighters.

Haftar, who served in Gaddafi's army and was accused by the post-revolution government of trying to stage a coup against it, has declared war on several Islamist factions and teamed up with the Thinni government's forces in Benghazi.

Source: Al Jazeera and agencies