BENGHAZI, Libya (Reuters) - Eastern Libyan forces have retaken from Islamist fighters the last district of Benghazi, the country’s second largest city, military officials said.

The battle for Benghazi, waged between forces led by General Khalifa Haftar and an array of Islamist militants and other fighters, has been part of a broader conflict since Libya slipped into turmoil following the 2011 fall of strongman Muammar Gaddafi.

Haftar had declared victory in July but fighting continued in one area, Khreibish.

Commander Wanis Bukhamada, head of army special forces, said the eastern forces now fully controlled the district.

“We declare in this moment the liberation of Benghazi from terrorists,” he told Reuters.

Haftar launched his “Operation Dignity” campaign in May 2014, slowly gaining the upper hand against Islamist militants and former rebels who fought Gaddafi in the 2011 uprising.

Haftar is aligned with a government and parliament based in eastern Libya. He has rejected a U.N.-backed government based in the capital, Tripoli, and indicated he wants to run for president in an election expected next year.

He is popular with some in the east tired of chaos but he remains a divisive figure in the rest of the North African oil-producing nation.