ISIL captured the city of Azaz from the Northern Storm Brigade in September 2013. This resulted in the closure of the Bab al-Salam border crossing from Turkey further north. The Northern Storm Brigade and the al-Tawhid Brigade withdrew from the city and were stationed in its outskirts. Full-blown conflict between ISIL and other rebel groups erupted in January 2014. In the first few days of the conflict, al-Qaeda's al-Nusra Front and Ahrar al-Sham brokered a ceasefire agreement with ISIL in the city of Aleppo and its northern countryside. However, ISIL continued its attacks on other rebel groups and killed more than 24 rebel fighters across northern Syria. The newly created Army of Mujahideen also pledged to fight ISIL in both Aleppo and Idlib.
The offensive
First phase
On 13 February 2014, the Kurdish Front Brigade, the Northern Storm Brigade, and the Descendents of Messengers Brigade declared the beginning of a battle to recapture Azaz and the rest of northern Aleppo from ISIL, code named the Battle of Dignity. The groups declared the front to be a military exclusion zone and warned civilians to leave the area. The first clashes began in the village of Maryamin, Afrin and resulted in the Kurdish Front capturing the village. Clashes spread to Deir Jamal and several other villages. The top commander of the Kurdish Front, Alaa Ajabu, was killed in action during the fighting 4 days later. By 28 February, ISIL forces withdrew from Azaz, Menagh Military Airbase, Deir Jamal, and several other villages. ISIL forces from the area retreated to their strongholds of al-Bab, Jarabulus and Manbij in eastern Aleppo.
Second phase
On 16 May 2014, 9 rebel groups formed the "Free Syria Operations Room", announced the beginning of the "Battle of Northern Earthquake", and declared the northern and eastern countrysides of Aleppo a military zone. Clashes took place in and near the town of al-Rai. ISIL reinforcements then arrived in al-Rai from Jarabulus to fight the rebels. In July 2014, ISIL launched a large-scale counter-offensive and recaptured the village of Bahwartah, north of Akhtarin, as well as 5 other villages. However, the al-Nusra Front and the Tawhid Brigade soon recaptured 3 of these villages. In response to the ISIL offensive, 11 rebel groups threatened to withdraw from the frontlines in the area due to the lack of support.