Nafisah was a descendant of the Islamic "Nabi" (Prophet) Muhammad, through his grandson Hasan ibn Ali, who married another descendant of Muhammad, that is Ishaq al-Mu'tamin, the son of the Imam Ja'far al-Sadiq, who was reportedly a teacher of ash-Shafi'i's teacher Malik ibn Anas and Abu Hanifah. Thus all of the four great Imams of Sunni "Fiqh" (Abu Hanifah, Malik, his student Ash-Shafi'i, and his student Ibn Hanbal) are connected to Imam Ja'far from the "Bayt" (Household) of Muhammad, whether directly or indirectly.