BENGHAZI, Libya (Reuters) - Libya’s eastern commander Khalifa Haftar said on Wednesday his forces had taken full control of Libya’s second city Benghazi from rival armed groups after a three-year campaign.

Slideshow ( 16 images )

The battle for Benghazi between Haftar’s self-styled Libyan National Army (LNA) 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.

Victory would mark a major advance for the one-time commander in Gaddafi’s army, who has slowly gained ground in eastern and southern Libya in defiance of a U.N.-backed government that is struggling to extend its influence from the capital, Tripoli.

“Your armed forces declare to you the liberation of Benghazi from terrorism, a full liberation and a victory of dignity,” Haftar said, wearing a white uniform in a televised speech.

“Benghazi has entered into a new era of safety and peace.”

Before he spoke, LNA forces made rapid progress through the seafront district of Sabri, using heavy artillery to blast their way through some of the final pockets of resistance.

As they have after past retreats in the battle for the city, rival armed groups may fall back on using guerrilla tactics against Haftar’s forces.

Haftar launched his “Operation Dignity” in Benghazi in May 2014, promising to crush Islamists blamed for a wave of assassinations and bombings.

Over three years his forces have clashed with militants as well as with former anti-Gaddafi rebels resisting what they saw as an attempt to reimpose autocratic rule. The LNA suffered heavy losses, which its own officials put at more than 5,000 men.

Haftar’s critics accuse him of dragging Benghazi into a war that he has used to establish military control over much of eastern Libya. Parts of Benghazi have been wrecked by heavy shelling and air strikes.

In Sabri, where the LNA advanced on Wednesday, deserted streets were littered with debris and the shells of rusting cars. Some buildings have been destroyed and others peppered with holes from bullets and shrapnel.

Having seized a string of key oil ports and southern air bases since last year, Haftar has made little secret of ambitions to enter Tripoli, where he portrays his rivals as beholden to Islamists and militia rule.

He has backing from foreign powers including Egypt and the United Arab Emirates, and has cultivated closer ties with Moscow. The LNA has gradually grown bigger and better equipped but is still heavily dependent on alliances with local brigades and tribes.

Though weak, the U.N.-backed government in Tripoli retains the formal support of most Western powers.