AMMAN - Islamic State fighters have largely withdrawn from a Palestinian refugee camp on the outskirts of Damascus after expelling their main rival, several residents and a Palestinian official said on Wednesday.

The pull-out from Yarmouk leaves al Qaeda-linked Nusra as the main group inside the camp. The sources said hundreds of fighters of the hardline Islamic State had returned to their stronghold in neighbouring Hajar al Aswad, from where they had launched their attack earlier this month. “Most of them have withdrawn in mostly to-and-fro skirmishes that took place between them and their advesaries,” resident Abu Ahmad Hawari said. Alongside seeking to capture the camp, they sought to defeat their rival, the Hamas-linked Aknaf al Maqdis, an opposition group that was ideologically opposed to them.

Islamic State’s arrival in Yarmouk had given the militant group a significant foothold a few kilometers from Syrian President Bashar al-Assad’s seat of power.

The group was still fighting some of the remaining Aknaf al Maqdis fighters in the northern entrance of the camp at the junction of the main Palestine and Yarmouk streets, two residents said.

The withdrawal leaves al-Qaeda offshoot al Nusra as the biggest force in the camp, many of whose residents have fled since Islamic State launched its offensive, they added.

The Palestine Liberation Organisation envoy to Damascus said that Nusra was now the main group in the camp.

“They and Nusra are one. They are changing positions,” Anwar Abdul Hadi told Reuters.

Nusra was accused by its rivals of facilitating the entry of Islamic State militants into the camp. Although they are rivals elsewhere in Syria, both share a loathing for Aknaf al Maqdis.

But Nusra, unlike Islamic State, was not ready to push its rivalry to a military confrontation and did not engage in the latest round of fighting in Yarmouk, according to residents.

Meanwhile, Islamic State militants gained ground in western Iraq on Wednesday, overrunning another village near the capital of Anbar province in a dawn raid, police sources and local officials said.

Hundreds of families were fleeing Albu Ghanim after security forces came under attack from the militants overnight and withdrew from the area, around 5 km (3 miles) northeast of the provincial capital Ramadi.

The militants have been making inroads on Ramadi’s northern periphery since the government announced the start of a new offensive last week to recapture the Sunni heartland of Anbar.

Large parts of the province had slipped from the government’s grasp even before Islamic State seized the northern city of Mosul last June and proclaimed a caliphate straddling the border between Iraq and Syria.

Security forces and Shi’ite paramilitaries have since regained some ground in Iraq, although core Sunni territories remain under Islamic State control, including Nineveh province, of which Mosul is capital, and most of Anbar.

The new Anbar campaign was intended to build on a victory in the city of Tikrit, which Iraqi security forces and Shi’ite paramilitaries retook this month.

But the Sunni militants have struck back in Anbar as well as Baiji, where they blasted through the security perimeter around Iraq’s largest refinery several days ago.

The operations command for Salahuddin province in which Baiji is located said skirmishes between security forces and the militants continued on Wednesday inside the refinery compound.