Libya's newly elected parliament held its first formal session on Monday as rival armed factions continued to battle for dominance of a country that was a dictatorship for decades before Muammar Gaddafi's fall three years ago.
Lawmakers gathered in a heavily guarded hotel in the eastern city of Tobruk after three weeks of fighting in Tripoli and in Benghazi had made the capital and the country's second city unsafe for the parliament session.
Western nations that have pulled out of the country since the fighting began hope the new assembly might help nudge the warring factions towards a ceasefire and negotiations to end their political standoff.
Elected in June, the House of Representatives replaces the General National Congress (GNC) where, some analysts say, Islamist factions had more influence than in the new one.
"A swift transition from the GNC to the new parliament is vital because the country is in turmoil," Azzedine al-Awami, the former deputy GNC chief, said at start of the first session.
"We hope all Libyans stand together to put our country's best interests first."
But in a sign of division over the legitimacy of the new assembly, in Tripoli, Nouri Abusahmain, an Islamist who was president of the GNC, called for a rival parliamentary session in the capital to make an official handover of power.
It was not immediately clear how much support his call would receive.
Heavy artillery and rocket fire restarted on Monday across southern Tripoli, where Islamist-leaning Misrata brigades are fighting to oust rival Zintani militias from the international airport they have controlled since 2011.
More than 200 people have been killed in the recent fighting in Tripoli and the eastern city of Benghazi.
The Tripoli airport battle is part of a wider political struggle between two loose factions of ex-rebels and their political allies who once fought together against Gaddafi, but whose rivalries exploded over the spoils of post-war Libya.
On one side of Libya's battle are Zintan brigades - based in the city some 130 km (80 miles) southwest of Tripoli - with their anti-Islamist Qaaqaa and Al-Sawaiq fighters, including some ex-Gaddafi forces, and political allies who say they are a bulwark against Islamist extremists taking over Libya.
Against them are fighters loyal to the western port of Misrata who are allied with the Islamist Justice and Construction party, an arm of the Muslim Brotherhood, who say they are fighting to purge ex-Gaddafi elements.
Britain was closing its embassy operations on Monday, one of the last foreign governments to pull its diplomatic staff, following the evacuation of the United States and the United Nations after the fighting erupted in Tripoli.
A Royal Navy ship on Sunday evacuated more than 100 British citizens, Libyan families and some foreign nationals. Other diplomats crossed by road into neighbouring Tunisia.
With its new national army still in formation, Libya's fragile government has long struggled against the power of the militia brigades, who have skirmished over parts of the capital since Tripoli fell in 2011.
Many of the militia brigades are on the government payroll, approved by competing factions in ministries and the parliament, but are often more loyal to commanders, political allies or regions than to the Libyan state.
The General National Congress was stormed numerous times by different militia brigades trying to pressure lawmakers on political decisions or to demand it dissolve.
But the fighting over the airport three weeks ago has been the worst since the 2011 war.
Most of Tripoli has been calm, with fighting mainly restricted to the de facto frontlines in the south and parts of the west of the city. Fuel prices have soared on the black market as fighting has caused shortages.
Complicating Libya's security, in Benghazi an alliance of Islamist fighters and ex-rebels have joined together to battle Libyan armed forces, seizing a special forces military base last week and pushing the army outside of the city.
Those Islamists, from the Ansar al-Sharia group, are branded a terrorist organisation by Washington and blamed for the attack on the U.S. mission in Benghazi in 2012, in which the U.S. ambassador and three other Americans died.