Al-Muzaffar Ghazi, a Kurdish Ayyubid ruler and military commander, governed Mayyafariqin from 1220 until his death in 1247. He strengthened the city’s defenses, enlarged its mosque, and built a madrasa. In 1240–1241, when a Mongol embassy demanded the city’s surrender, he reportedly persuaded or bribed its representatives to depart.
A son of Sultan Al-Adil, Ghazi first received Edessa and Saruj in 1211, later building a new gate at Edessa. In 1220–1221, he exchanged those territories with his brother Al-Ashraf for Mayyafariqin and Akhlat. Al-Ashraf named him viceregent and heir in his own lands, but Ghazi rebelled while his brother was away campaigning in Egypt. He lost that succession and was left with Mayyafariqin, though the brothers later remained allies.
Ghazi joined Ayyubid campaigns in southeastern Anatolia. In 1230, he contributed troops to the coalition that defeated Jalal al-Din Mangburni’s Khwarezmian army at Yassıçemen and recovered Akhlat. In 1232, he took part in the campaign against Emir Mas’ud, helping secure the surrender of Amida and later Hasankeyf; both cities were assigned to Al-Kamil’s son, as-Salih Ayyub.
Mayyafariqin faced continuing pressure from Seljuk and Mongol forces during Ghazi’s later years. He died in 1247 and was succeeded by his son, Al-Kamil Muhammad.