Libya's Ansar al-Sharia armed group announced its own dissolution on Saturday, saying it has been "weakened" by fighting in Benghazi.

The group had been clashing in the eastern city with forces loyal to renegade general Khalifa Haftar.

"We officially announce to everyone, especially Libyans, the dissolution of Ansar al-Sharia in Libya," the group said in a statement published online.

The decision came on the back of heavy losses that wiped out its leaders and decimated its fighters, Ansar al-Sharia said, calling on other armed groups in Benghazi to form a united front and continue fighting.

READ MORE: What is it like living in Libya these days?

Haftar's Libyan National Army (LNA) intensified earlier this month an offensive to oust Ansar al-Sharia fighters from their two remaining strongholds in Benghazi.

Al Jazeera’s Mahmoud Abdelwahed, reporting from Tripoli, said the group's dissolution was "not a big victory for Hafthar's forces", describing Ansar al-Sharia as "the smallest and weakest" of all the armed groups fighting against the LNA. 

Ansar al-Sharia is one of the armed groups that sprung up in Benghazi, Libya's second-largest city, in the chaos following the death of ex-ruler Muammar Gaddafi in 2011.

The United States blames the group for the assault on a diplomatic compound in Benghazi in 2012 which killed US Ambassador Christopher Stevens and three other Americans.

Ansar al-Sharia overran the city in 2014, but lost its leader, Mohamed al-Zahawi, in clashes with Haftar's forces at the end of that year.

At its zenith, Ansar al-Sharia was present in Benghazi and Derna in eastern Syria, with offshoots in Sirte and Sabratha, western Libya.

Libya has been wracked by chaos since Gaddafi's ouster with rival armed groups and authorities vying for control of the oil-rich country.

Haftar, whose Libyan National Army's control key oil ports, is a dominant figure for factions in eastern Libya that have rejected the UN-backed Government of National Accord (GNA) in the capital, Tripoli.

Source: Al Jazeera and news agencies