Mustansiriya Madrasah (Arabic , ﺍﻟﻤﺪﺭﺳﺔ ﺍﻟﻤﺴﺘﻨﺼﺮﻳﺔ ) is a historical building in Baghdad, Iraq . It was the premises of one of the oldest Islamic institutions of higher learning in the world, established in 1227 as a madrasah by the Abbasid Caliph al-Mustansir making it one of the oldest madrasahs in the world. It is located on the left bank of the Tigris River, the building survived the Mongol sack of 1258 , and has been restored. Nearby buildings included the Saray souq , the Baghdadi Museum, Mutanabbi Street , the Abbasid Palace and Caliph’s Street.
Its library had an initial collection of 80,000 volumes, given by the Caliph. The collection was said to have grown to 400,000 volumes, although the reports of both these figures may have been exaggerated to flatter the donors. The library certainly survived the Mongol incursion. It was merged with that of Nizamiyah Madrasah in 1393 A.D., although this collection was subsequently dispersed or disappeared.
After the Ottomans captured Baghdad in 1534 A.D., books from the palaces and libraries were taken as the spoils of war to become an important part of the royal library in Istanbul, and Al-Mustansiriyah was closed.
In 1235, an early monumental water-powered alarm clock that announced the appointed hours of prayer and the time both by day and by night was completed in the entrance hall of the Mustansiriya Madrasah in Baghdad .
The Mustansriya Madrasah is still functioning in a new building, and is now part of the Al-Mustansiriya University , following an expansion and restructuring of the original madrasah in 1927 as part of a program of modernization.