The body of an Ansar al-Shariah militiaman lies on the ground in Benghazi, Libya, Wednesday, Oct. 15, 2014 (Photo: AP)
Islamist militias held their ground Thursday in the face of an assault by an ex-general backed by army units aimed at retaking Libya's second city of Benghazi, military sources said.
Medics said at least 17 people were killed in 24 hours of fighting since Khalifa Haftar's forces early on Wednesday launched what he called an operation to "liberate" the city.
Tanks spearheaded attacks on an Islamist militia, the "February 17 Martyrs Brigade," while warplanes carried out raids on its headquarters in a western suburb of the Mediterranean city.
The army and Haftar's forces said they captured the February 17 headquarters after several hours of clashes on Wednesday.
But military sources said Thursday that pro-government forces were later forced to withdraw from the former army base under fire by Islamist fighters.
Several explosions and gunfire echoed throughout the night, AFP correspondents said, before the fighting eased on Thursday as military aircraft swept over the city.
Islamist militias have seized control of large parts of turmoil-gripped Libya since a 2011 uprising against long-time leader Moamer Kadhafi, with the authorities struggling to control them.
The army has this time publicly thrown its weight behind Haftar, who launched a first, unsuccessful, campaign against the Islamists in May, dubbing it "Operation Dignity".
"The Libyan army claims 'Operation Dignity'" as one of its own campaigns, spokesman Colonel Ahmed al-Mesmari said Wednesday.
The Islamists include the Ansar al-Sharia jihadist militia, which the United States has branded a "terrorist" organisation.
Since launching Operation Dignity, Haftar and his forces have been steadily beaten back to a final redoubt at Benghazi's airport, which has come under attack by Islamists since mid-September.
Last week, more than 50 people were killed in fighting between the rival sides, according to military and hospital sources.
Before their rapprochement with Haftar, the authorities had in May accused the former Kadhafi-era general -- who spent years in exile before returning to join the 2011 revolution -- of trying to mount a coup.
But the internationally-recognised interim government of Prime Minister Abdullah al-Thani "is now left with no choice but to make things up with Haftar, who portrays himself as Libya's saviour," said Libyan analyst Fradj Najm.
Oil-rich Libya has two competing governments as well as a host of rival armed militias jostling for influence in the largely lawless country.
One parliament, elected in June, is recognised by the international community but contested by the militia controlling most of Tripoli and by the Islamists who dominate Benghazi.
Thani and the majority faction of that legislature decamped this summer to the far eastern city of Tobruk because of widespread insecurity, including in the capital, where a rival administration has been set up.
UN chief Ban Ki-moon made a surprise visit to Tripoli on Saturday to urge the warring factions to end the turmoil.
Clashes between rival militias have driven an estimated 287,000 people from their homes, including 100,000 who have fled the outskirts of Tripoli, according to the UN refugee agency.