Born in 1130, he occupied high office under the last Fatimid caliphs, and continued serving the Ayyubid regime after that.
[1] It was for the Ayyubid ruler Saladin that he compiled his History of the two dynasties (Nuzhat al-muḳlatayn fī akhbār al-dawlatayn).
[1][2] Ibn al-Tuwayr's access to Fatimid archives has led to his work being held in high regard by both medieval and modern historians: the 15th-century historian Ibn Taghribirdi considered him as the most important source on the Fatimid Caliphate, and N. J. G. Kaptein qualifies his history as an "invaluable source".
Based on the surviving material, the work begins with the reign of al-Amir bi-Ahkam Allah and continued to the end of the Fatimid period.
The only indication of the work continuing into the Ayyubid period is provided by al-Maqrizi, who records its full title with al-dawlatayn ("the two dynasties") at the end.