In Islam, the ulama (ˈuːləˌmɑː; Ulamā; singular Ālim) also spelled ulema (feminine singular alimah; plural aalimath) are the guardians, transmitters, and interpreters of religious knowledge in Islam, including Islamic doctrine and law. By longstanding tradition, ulama are educated in religious institutions (madrasas). The Quran and sunnah (authentic hadith) are the scriptural sources of traditional Islamic law. Students do not associate themselves with a specific educational institution, but rather seek to join renowned teachers. By tradition, a scholar who has completed his studies is approved by his teacher. At the teacher's individual discretion, the student is given the permission for teaching and for the issuing of legal opinions (fatwa). The official approval is known as the ijazat at-tadris wa 'l-ifta (license to teach and issue legal opinions). Through time, this practice has established a chain of teachers and pupils who have become teachers in their own time. The traditional place of higher education is the madrasa. The institution likely came up in Khurasan during the 10th century AD, and spread to other parts of the Islamic world from the late 11th century onwards. The most famous early madrasas are the Sunni Niẓāmiyya, founded by the Seljuk vizir Nizam al-Mulk (1018–1092) in Iran and Iraq in the 11th century. The Mustansiriya, established by the Abbasid caliph Al-Mustansir in Baghdad in 1234 AD, was the first to be founded by a caliph, and also the first known to host teachers of all four major madhhab known at that time. From the time of the Persian Ilkhanate (1260–1335 AD) and the Timurid dynasty (1370–1507 AD) onwards, madrasas have often become part of an architectural complex which also includes a mosque, a Sufi ṭarīqa, and other buildings of socio-cultural function, like baths or a hospital. Madrasas are sacred places of learning. They may provide boarding and salaries to a limited number of teachers, and boarding for a number of students out of the revenue from religious endowments (waqf), allocated to a specific institution by the donor.