Tripoli Fighting
Smoke rises after rockets fired by one of Libya's militias struck and ignited a building after clashes between rival militias, in an area at Alswani road in Tripoli August 2, 2014. Reuters

(Reuters) - Libya's government said 22 people had been killed in the latest battles between armed factions to control Tripoli airport, and fighting left a huge fire raging on Sunday at gas tanks at the city's fuel depot.

The factions have been fighting for nearly three weeks to gain control of Tripoli airport in the worst violence since the 2011 civil war that ousted Muammar Gaddafi.

"Tripoli's hospitals received 22 bodies (on Saturday) and 72 people were wounded," Libya's government said in a statement on Sunday.

"Mediating committees are still trying to stop the violence and return Tripoli to normal. They have faced difficulties because of the stubbornness of the militias attacking the city."

The capital was quieter on Sunday morning except for sporadic blasts. But eight gas tanks at Tripoli's fuel depot, which is near the airport and was hit by a rocket on Saturday, were still burning, creating a huge smoke cloud over the city.

The Oil Ministry issued a warning that tanks could explode and called on the Health Ministry to be prepared in case of casualties.

Most Western governments have evacuated their embassies after clashes erupted in Tripoli and the eastern city of Benghazi more than two weeks ago, fearing Libya is sliding back into civil war.

Britain, one of the last Western countries to keep its embassy open, said late on Friday that it would evacuate its diplomatic staff to Tunisia and close the embassy on Monday.

Islamist-leaning brigades allied to the western port town of Misrata have been attacking the airport with rockets and artillery to oust rivals from the mountain town of Zintan who have controlled the airport since the fall of Tripoli in 2011.

Misrata and Zintan rebel fighters once battled side by side to topple the country's dictator. But three years on they have refused to disarm and their rivalries have exploded in a violent struggle over who dominates post-Gaddafi Libya.

Libya's government and weak military have been unable to control the armed factions, who often claim semi-official status approved and paid for by ministries, and control huge stockpiles of Gaddafi-era weapons, tanks and missiles.

Firefighters have been battling to extinguish the massive blaze at the fuel depot that supplies Tripoli and that has been hit twice in a week by rockets and shell fire.

Most of the rest Tripoli was quiet, with fighting mostly restricted to the defacto frontlines in the south and parts of the west of the city. Fuel prices, though, have soared on the black market as fighting has caused fuel shortages.

DEEPENING DIVIDE

Fighting with Grad rockets and artillery over Tripoli has closed the airport and prompted the United States, the United Nations and most European governments to pull their diplomats out of the North African state.

Western governments hope Libya's newly elected parliament, which is meeting in the eastern city of Tobruk, will create some space for the warring factions to reach a political settlement and a ceasefire.

But the sides are bitterly polarized around two loose confederations of militias and their political allies, with rival visions for a post-Gaddafi Libya.

Fighters from the mountain town of Zintan, including ex-Gaddafi forces in the Qaaqaa and Al-Sawaiq brigades, are allied with the National Forces Alliance movement led by a former Gaddafi official.

Leaders of the fighters from Zintan say their brigades are a bulwark against rivals they brand Islamist extremists trying to control Libya.

Lining up against them are more Islamist-leaning brigades close to the port town of Misrata, which are aligned with the Justice and Construction party and the Muslim Brotherhood. They say they are fighting to clean out remnants of Gaddafi's army.

Complicating Libya's chaos, in Benghazi, an alliance of Islamist fighters and ex-rebels banded together to battle Libyan armed forces, seizing a special forces military base last week and pushing the army outside of the city.

They joined forces when a renegade ex-army officer and former Gaddafi ally, Khalifa Haftar, allied himself with regular special forces in the city to launch a campaign to oust Islamist militants from Benghazi.

The Islamists, Ansar al-Sharia, are branded a terrorist organization 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.