The madrasa was the endowed college of the Islamic city, a residential institution combining teaching rooms, a mosque, lodgings and a library to train scholars chiefly in religious law. The state-sponsored network of Nizamiyya colleges, founded by the Seljuk vizier Nizam al-Mulk from around 1065 with its flagship in Baghdad, gave the type its systematic form and spread it across Nishapur, Isfahan and other cities. Funded and protected in perpetuity by waqf, the madrasa fixed teaching in a permanent, recognisable building rather than the informal mosque circle. Its four-iwan courtyard plan became one of the signature monuments of the Islamic urban centre.
The madrasa institutionalised higher education in a dedicated, endowed building, anchoring scholarly life in the fabric of the city and shaping the form of historic Muslim quarters. As an endowed teaching college it is widely cited as a precursor to the medieval European university.