The 'Alids were partisians of Ali, son in law of the prophet and fourth caliph of Islam (A.D. 656-661); they were the legitimists of Islam who sought to replace the 'Abbasid dynasty with a dynasty from among the descendants of 'Ali .