Syrian rebels ejected a Qaeda-linked militant group from its headquarters in the city of Aleppo on Wednesday, according to an opposition group that monitors the war from Britain. The strike was a sharp blow to the group, the Islamic State of Iraq and Syria, which has been losing ground to rebel forces in the worst round of infighting yet between opponents of the Syrian president, Bashar al-Assad.

Deadly battles have raged in recent days across northern Syria between rebel forces and the Islamic State of Iraq and Syria, which also wants to depose Mr. Assad’s government but aims to replace it with a monolithic Sunni extremist government that rules both countries.

Angered by what they call the tendency of ISIS to commandeer resources, impose strict social codes, and kidnap and kill opponents, rebel groups have been attacking its bases and trying to drive out its fighters from towns and villages where they once held sway.