Ibn al-Tuwayr

Abū Muḥammad ʿAbd al-Salām ibn al-Ḥasan ibn al-Ṭuwayr al-Qaysarānī al-Miṣrī (1130–1220) was an Egyptian official and historian.

Born in 1130, he occupied high office under the last Fatimid caliphs, and continued serving the Ayyubid regime after that.

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). This work is now lost, but was used by other medieval historians such as Ibn Khaldun, al-Maqrizi and al-Qalqashandi as their main source for the later Fatimid period and the institutions of the Fatimid Caliphate. 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".

The modern historian Claude Cahen has tried to reconstruct the work based on the quotations from the later historians. 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.