The Islamic State (Isis) offshoot in eastern Libya, IS in Cyrenaica, has been driven out of its stronghold of Derna after days of bloody fighting between the group and al-Qaeda linked militia Abu Salim Martyrs Brigade.
Violent clashes between the two militant groups erupted on 9 June after IS fighters assassinated Nasser Aker, a senior figure in Derna's Jihadi Shura Council, a body linked to the Abu Salim Brigade.
At least nine were killed in the initial fighting, Reuters reported, including Salem Derbi, one of Libya's best known revolutionary leaders and the commander of the al-Qaeda linked Abu Salim Brigade.
Abu Salim and its allies in Ansar Al-Sharia have now expelled the majority of IS forces in Derna from the city, pushing them into the mountainous region to the east in Ras Hilel.
Jamal Zubia, an official spokesman for the government in Tripoli, hailed the victory as a gain for the western Islamist government. The forces in Derna united against IS are in an alliance with Tripoli and the powerful militias that back it.
"Of course this is a victory for Tripoli because these thuwar [revolutionaries] and their leaders have remained loyal. Now the Shura Council in Derna is in complete control of the town and there is no IS in Derna," Zubia said.
"Many have been killed and captured from Daesh [Islamic State] and others have been kicked out. They have now moved 30 or 50km to the east," he added.
There had been reports that Sofian Qumu, a senior IS fighter who defected from Ansar Al-Sharia, had been killed in the fighting. However Zubia claimed to the contrary that Qumu had been captured and was being detained in Derna's prison.
Analyst and non-resident fellow at the Atlantic Council Centre for the Middle East, Mohammed Eljahr, told IBTimes UK that Abu Salim Brigade had always had superior numbers and firepower relative to IS in Derna.
He also said that when the al-Qaeda linked militia asked IS forces to leave Derna, many acquiesced. "Sources in Abu Salim have indicated that when they called for them to give up fighting many did so or went into hiding in the mountains," he said.
However, Eljahr doubted that IS's defeat in Derna signified the end of their campaign in the east of Libya. He explained that IS now had two choices and could either regroup in the mountains and counter attack or set up a power-base elsewhere.