Zengid dynasty
The Shafii madhhab was spread by Al-Shafii students in Cairo, Mecca and Baghdad. It became widely accepted in early history of Islam. The chief representative of the Iraqi school was Abu Ishaq al-Shirazi, whilst in Khorasan, the Shafii school was spread by al-Juwayni and al-Iraqi. These two branches merged around Ibn al-Salah and his father. The Shafii jurisprudence was adopted as the official law during the Great Seljuq Empire, Zengid dynasty, Ayyubid dynasty and later the Mamluk Sultanate (Cairo), where it saw its widest application. It was also adopted by the Kathiri state in Hadhramawt and most of rule of the Sharif of Mecca.