The United States military said on Sunday it had pulled some of its forces out of Libya. The temporary withdrawal came amid an upsurge in fighting in the oil-rich country.

"Due to increased unrest in Libya, a contingent of US forces supporting US Africa Command [AFRICOM] temporarily relocated from the country in response to security conditions on the ground," said a statement from the command, which is headquartered in Stuttgart, Germany.

"The security realities on the ground in Libya are growing increasingly complex and unpredictable," said US Marine Corps Gen. Thomas Waldhauser.

The American troop withdrawal was followed by an announcement by Libya's Tripoli-based interim government that it had launched a "counter offensive" to defend the capital, reported France's Agence France-Presse news agency.

Read more: Libya: The road from revolution to civil war

Advance on Tripoli: Militias from the western Libyan cities of Zawiya and Misrata said Friday that they would resist an advance on the capital by Libyan National Army commander Khalifa Haftar, with reports that his forces had been pushed back from a key checkpoint near the city. The push toward Tripoli by Haftar comes amid growing fears of a renewed civil conflict in Libya.

Later on Sunday, there were reports of airstrikes in southern Tripoli as eastern Libyan forces attempted a push towards the city center.

A torn country: Libya has been without a stable government since a NATO-backed uprising ousted and killed longtime dictator Moammar Gadhafi in 2011. Since then, dozens of militias have fought for control of the oil-rich country.

Parallel government: The Tripoli-based interim government, the Government of National Accord (GNA), which was set up with UN backing in 2015, has been unable to enforce its authority in the entire country. The LNA backs a parallel administration in the east that has emerged as a major rival to that in Tripoli.

Read more: UN Security Council calls on eastern Libya forces to halt offensive on Tripoli

kw/jlw (AP, AFP)

Every evening, DW's editors send out a selection of the day's hard news and quality feature journalism. You can sign up to receive it directly here.