Shafi'i, al- (Abu Abdullah Muhammad ibn Idris al-Shafi'i), 767–820, Islamic jurist. Raised and educated in Mecca and Medina, he taught in Egypt and Baghdad. His teachings laid the groundwork for the Shafi'i school of Sunni Islam, one of four such schools. The Shafi'i school gives equal weight to the traditions (hadith) and the Qur'an, emphasizing the consensus (ijma) of the Islamic community as the most important secondary source of law. Al-Shafi'i wrote al-Risala, which is considered the foundation of Islamic jurisprudence.