Washington: The US military has officially ended operations in a former Daesh bastion in Libya, officials announced Tuesday.

The Pentagon had launched Operation Odyssey Lightning to help local forces push the militants from the coastal city of Sirte on August 1.

"In partnership with the Libyan Government of National Accord, the operation succeeded in its core objective of enabling GNA-aligned forces to drive Daesh out of Sirte," the US military's Africa Command said in a statement.

US drones, gunships and warplanes had hammered Daesh positions, conducting a total of 495 strikes.

"We are proud to have supported this campaign to eliminate [Daesh’s] hold over the only city it has controlled outside Iraq and Syria," Pentagon press secretary Peter Cook told reporters.

Officials said the United States would continue to strike Daesh militants if the Libyan unity government asked for help in doing so.

Unity government leader Fayez Al Sarraj on Saturday announced that military operations in Sirte were done, but Daesh still has fighters in Libya and on Sunday conducted a suicide attack in Benghazi.

The fall of Sirte – longtime dictator Muammar Gaddafi’s home town located 450 kilometres east of Tripoli – is a major setback for Daesh, which has also faced military defeats in Syria and Iraq.

Libya descended into chaos following the NATO-backed ousting of Gaddafi in 2011, with rival administrations emerging and well-armed militias vying for control of its vast oil wealth.