In excavations of the site of Tell Azaz, considerable quantities of ceramics from the early and middle Islamic periods were found. Despite the importance of Azaz as indicated by archaeological finds, the settlement was rarely mentioned in Islamic texts prior to the 12th century. However, a visit to the town by the Muslim musician Ishaq al-Mawsili gives some indication of Azaz's importance during Abbasid rule. The Hamdanids built a brick citadel at Azaz. It was a square fortress with two enclosures, situated atop a tell. On 10 August 1030, Tubbal near Azaz became the scene of a humiliating defeat of the Byzantine emperor Romanos III at the hands of the Mirdasids. In December of the same year, the Byzantine generals Niketas of Mistheia and Symeon besieged and captured Azaz, and burned Tubbal to the ground in retaliation.
Crusader period
During the Crusader era, Azaz, which was referred to in Crusader sources as "Hazart", became of particular strategic significance due to its topography and location, overlooking the surrounding region. In the hands of the Muslims, Azaz stymied communications between the Crusader states of Edessa and Antioch, while in Crusader hands it threatened the major Muslim city of Aleppo. Around December 1118, the Crusader prince Roger of Antioch and the Armenian prince Leo I besieged and captured Azaz from the Turcoman prince Ilghazi of Mardin. In January 1124, Balak and Toghtekin, the Buridatabeg of Damascus, breached Azaz's defenses, but were repulsed by Crusader reinforcements. In April 1125, the Seljuk atabeg Aq-Sunqur il-Bursuqi of Mosul and Toghtekin invaded the Principality of Antioch and surrounded Azaz. In response, in May or June 1125, a 3,000-strong Crusader coalition commanded by King Baldwin II of Jerusalem confronted and defeated the 15,000-strong Muslim coalition at the Battle of Azaz, raising the siege of the town. However, the Crusaders' strength in the region was dealt a blow following the Zengidcapture of Edessa in 1144. Afterward, the other fortresses in the County of Edessa, including Azaz, gradually became neglected. In 1146, Humphrey II of Toron sent sixty knights to reinforce the garrison at Azaz. Despite its strong fortifications, the fortress of Azaz finally fell to the Muslims under the Zengid emir of Aleppo, Nur ad-Din in June 1150.
On 19 July 2012, during the Syrian civil war, rebels opposed to the Syrian government succeeded in capturing the town. The town is highly valued as a logistical supply route close to the Turkish–Syrian border. The Islamic State of Iraq and the Levant took control of Azaz in October 2013, but withdrew from the city in February 2014 after having been cut off from the rest of its territory. Following the departure of ISIL, Azaz was left under the control of Northern Storm, a brigade under the authority of the Islamic Front, nominally a part of the Free Syrian Army at that time. A Sharia Committee is responsible for the administration of sharia law, and is policed by the Northern Storm brigade. A Civil Council governs the field of public services. During its northern offensive in 2015, ISIL approached Azaz, but fell short of directly assaulting the city; taking Kafra and surrounding territory. While regular ISIL forces were finally expelled from the Aleppo Governorate in October 2016, the January 2017 Azaz bombing was attributed to ISIL. In January 2015, al-Nusra Front had a limited presence in the town and controlled one mosque. By October 2015, the control of the town was shared between Nusra and a brigade of the FSA. Turkey began organising Turkmen militia bases in Azaz during the People's Protection Units advance against ISIL in 2015, in order to prevent the YPG obtaining a land bridge between the Afrin and Kobanî Cantons. The Turkish government declared Azaz to be a "red line" which Kurdish forces must not cross. Azaz became one of the first towns to come under the Turkish occupation of northern Syria during the 2016 Operation Euphrates Shield. By late 2017, Azaz was the headquarters of the Syrian Interim Government.