In a surprise offensive that began Friday, remnants of the U.S.-backed Free Syrian Army and fighters from another rebel faction, the Islamic Front, this weekend cleared more than a dozen bases held by the al Qaida-affiliated Islamic State of Iraq and Syria.

But the rebels were unable to oust ISIS from its main headquarters at Ad Dana, near the Turkish border, and the towns of Kfar Zeta in Hama province and Saraqeb in Idlib province. Meanwhile, ISIS reportedly had dispatched reinforcements from its stronghold in Raqqa province to Aleppo, Syria’s second largest city.

The Syrian Observatory for Human Rights, a London-based monitoring group, said some 60 fighters were killed in clashes between the non-regime groups, nine of them from ISIS.

Although fighting continues, the intra-rebel conflict put an end to a four month-long ISIS offensive. Claiming it was seeking to build a caliphate, the Iraq-based ISIS seized more than 20 locations controlled by the Western-backed Free Syrian Army and kidnapped its military commanders, as well prominent leaders of more moderate Islamist groups. Its relations with the general public also soured, as ISIS, which consists mostly of non-Syrian volunteers, set up a reign of religious tyranny wherever it got a foothold.

The offensive against ISIS coincided with moves by the Iraqi branch of ISIS in recent days to seize two major cities inside Iraq, Fallujah, which remained in ISIS hands on Sunday, and Ramadi, the capital of Anbar province, where fighting was ongoing.

In Syria, ISIS remained in control of Raqqa, the only provincial capital to have fallen to anti-government forces in the nearly three-year-long civil war, and continued to be a major presence in Aleppo, which pro and anti-government forces have been contesting for 17 months.

But its influence over the rest of northern Syria appeared to have shrunk dramatically, with the biggest losses along the Turkish border.

Syria’s much maligned opposition coalition, which calls for a democracy, rule of law and a secular state but which has been largely eclipsed by both ISIS and the Islamic Front in recent months, seemed buoyed by the sudden change of fortunes. At a general assembly of its membership at an undisclosed location in Turkey, the Syrian Opposition Coalition issued a statement accusing ISIS of “opposing the revolution” and commending the FSA for launching a number of operations “to deter the alien group.”

“Clashes with ISIS are inevitable if the Syrian people are going to achieve the goals of the revolution,” it said.

But whether the anti-ISIS push would have any long term benefit for the opposition coalition was not clear. The Islamic Front announced its formation Nov. 22, specifically calling for the establishment of an Islamic state. Some of the armed groups that formed the Islamic Front already had announced in September their rejection of the opposition coalition.

The fighting seemed far from over.

Anti-government activists said ISIS forces had withdrawn Saturday from Bab al Hawa, the most important border crossing with Turkey, to Ad Dana, the ISIS’s main base nearby, where they were joined by fellow militants evacuating other bases.

Activist Hiba al Haji told McClatchy her brother is in Ad Dana and reported that another al Qaida affiliate, Jabhat al Nusra, which the United States has linked to al Qaida in Iraq and which has worked closely with ISIS, was attempting to mediate between ISIS and the other rebel forces.

The other two sieges were in Saraqeb, a key crossroads town in Idlib province that ISIS seized from this past autumn, and Kfar Zeta, a town in northern Hama province. Heavy fighting was also reported in the town of Manbij, Aleppo province, activists said.

One of the most surprising developments of the offensive was the reappearance of the FSA, which was largely seen as a defunct after the creation of the Islamic Front. The United States and Great Britain had suspended aid shipments to the group in December after ISIS overran its warehouses at Bab al Hawa, just inside the Syrian border, and Ahrar al Sham, another Islamist fighting force, failed to return the warehouses to the FSA after it took control of them.

But as rebels recaptured bases from ISIS, the flag that was raised was that of the FSA.

Never miss a local story.

Sign up today for a free 30 day free trial of unlimited digital access.