TRIPOLI (REUTERS) - Libya's new parliament appealed for national unity at its first formal session on Monday as rival armed factions battled for dominance of a country struggling to hold itself together three years after the fall of Muammar Gaddafi.
Hours before parliament met in the eastern city of Tobruk, heavy artillery and rocket fire hit southern and western parts of the capital Tripoli, where Islamist-leaning Misrata brigades have been fighting for three weeks to oust rival militias.
Lawmakers gathered in a heavily guarded hotel in Tobruk because three weeks of fighting in Tripoli and Benghazi had made Libya's two main cities unsafe for the parliamentary session.
Western nations, which have mostly pulled their diplomats out of the North African country due to the fighting, hope that the new assembly can nudge the warring factions towards a ceasefire and negotiations to end a political deadlock.
Elected in June, the House of Representatives replaces the General National Congress (GNC) after a vote which, analysts said, eroded the political dominance that Islamist factions linked to the Muslim Brotherhood had had in the legislature.
"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 the first session. "We hope all Libyans stand together to put our country's best interests first."
Justice Minister Saleh al-Marghani, standing in for the prime minister, who was attending a summit in the United States, urged lawmakers to form a unity government.
Out of 188 elected lawmakers, 158 were sworn in during the session in Tobruk.
The United States, Britain, France, Italy and Germany quickly issued a joint call for parties to accept a ceasefire and a dialogue supported by the United Nations, and to recognise the authority of the parliament's elected representatives.
But, underscoring divisions over the legitimacy of the new assembly, in Tripoli outgoing GNC president Nouri Abusahmain, an Islamist leader, dismissed the Tobruk gathering as unconstitutional because of how the session was held.
It was not immediately clear how much support his statement would generate or its impact on armed factions allied with the Islamist political leadership. Some Islamist-leaning lawmakers and ex-GNC members stayed away from Tobruk.
More than 200 people have been killed in the recent fighting in Tripoli and the eastern city of Benghazi. Clashes have closed off most international flights, damaged Tripoli's main airport and sent foreign diplomats and workers fleeing abroad.
The battle for the airport 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 are the Zintan brigades - based in the city some 130km south-west 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.
In a worrying development for Libya's budget, the country's lifeline oil production has slipped to 450,000 barrels per day from 500,000 bpd a week ago, the National Oil Corporation said on Monday, without explaining why output had fallen.
Even the previous figure is well below the 1.4 million bpd Libya produced a year ago, before strikes and blockades cut output and exports from the OPEC state.
Britain was closing its embassy operations on Monday, one of the last foreign governments to pull out 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. Some diplomats crossed by road into neighbouring Tunisia.
With its national army still in formation, Libya's fragile government has long struggled against the power of the militias, who have skirmished in parts of the capital since 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.
Most of Tripoli has stayed largely 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.
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 the city.
Those Islamists, from the Ansar al-Sharia group, are branded a terrorist organisation by Washington and blamed for an attack on the US mission in Benghazi in 2012, in which the US ambassador and three other Americans died.