Many Islamic scholars, especially those affiliated with madrasas, suggest that the first madrasa was the Darul Arqam, established by the Prophet Mohammed in Mecca. However, the Jamiat al Qarawiyyin, located in a mosque in the city of Fez, Morocco, is considered by many to be the oldest degree-awarding madrasa in the Muslim world. This school was established in 859 A.D. by Fatima Al-Fihri, daughter of the wealthy merchant Mohammed Al-Fihri. Al Karaouine University played a leading role in the cultural and academic relations between the Islamic world and Europe in the middle ages. Pope Sylvester II (999-1003), a French Pope, also received there and introduced Arabic knowledge of arithmetic, mathematics, and astronomy to Europe. Another of the greatest non-Muslim alumni of the university was the Jewish philosopher and theologian Maimonides (1135-1204), who studied under Abdul Arab Ibn Muwashah.
The cartographer Mohammed al-Idrisi (d. 1166), whose maps aided European exploration in the Renaissance is said to have lived in Fes for some time, suggesting that he may have worked or studied at Al Karaouine. The university has produced numerous scholars who have strongly influenced the intellectual and academic history of the Muslim world. Among these are Ibn Rushayd al-Sabti (d. 1321), Mohammed Ibn al-Hajj al-Abdari al-Fasi (d. 1336), Abu Imran al-Fasi (d. 1015), a leading theorist of the Maliki school of Islamic jurisprudence, and Leo Africanus, a renowned traveler and writer.
In addition to a place for worship, the mosque soon developed into a place for religious instruction and political discussion, gradually extending its education to a broad range of subjects, particularly the natural sciences. Begun as a theological seminary, Karaouine soon taught students everything from medicine to geography.
Many Muslim scholars and other researchers contend that the madrasa became more formalized in the eleventh century from existing education centers, both religious and secular. One of the major institutionalized madrasa systems was established in Baghdad in the eleventh century by Nizam ul-Mulk, an Abasid vizier of Baghdad. This Madrasa Nizamiya was setup to provide free education along with food and lodging for the students. Under this “Nizamiah” madrasa system, the purpose was to teach scholastic theology to produce spiritual leaders, and earthly knowledge to produce government servants who would be appointed in various regions of the Islamic empire. 
The Nizamiah system was endowed and controlled by the rulers of the empire. The ruling caliph had the authority to confirm the appointment of instructors and approve the curriculum. The madrasas received funding through a system of state patronage under the institution of the “waqf” (trust), through which the schools were financially supported. The madrasas received their operating funds, teacher salaries, and student stipends from this waqf. Thus, madrasas were under the direct control of the state.
The early madrasas proved remarkably capable of producing religious scholars, jurists, and civil servants. Based on this success, Nizam-ul-Mulk established other madrasas in Naysabur and other towns throughout the Islamic empire as a method of further extending the influence and control of the caliph. Nizam-ul-Mulk came to be recognized as the “Father of the Islamic public education system.”
For several hundred years, Islamic educational institutions, including madrasas, mosques, and universities, realized many notable accomplishments. Madrasas from Andalusia (the southern region of Spain) to the Indian subcontinent trained many great thinkers in science, math, philosophy, and medicine while maintaining a firm religious base. These institutions were also the centers for preserving and promoting the knowledge and works of the great classical empires of Greece, Rome, Persia, and Gallic Spain. Encouragement of independent reasoning or “ijtihad” was a main characteristic of those madrasas.
Many of the greatest innovations came from Middle Eastern madrasas during the Abbasid period (750–1258), including early ideas on evolution; important contributions to the philosophy of science; the first forms of non-Aristotelian logic; and the introduction of temporal, modal, and inductive logic. Such advances played a central role in the subsequent development of European logic during the Renaissance. Indeed, throughout the Middle Ages, Christian scholars travelled to the Islamic world to study the advanced learning available in the madrasas. The first college in Europe was in fact founded by Jocius de Londoniis, a pilgrim newly returned to Paris from the Middle East.
As noted by one prominent scholar, Al-Azhar University in Cairo, one of the oldest and greatest madrasas, “has good claim to being the most sophisticated institution of learning in the entire Mediterranean world during the early Middle Ages. The very idea of a university in the modern sense—a place of learning where students congregate to study a variety of subjects under a number of teachers—is generally regarded as an innovation first developed at Al-Azhar.” Even concepts such as having "fellows" holding a "chair," or students "reading" a subject and obtaining "degrees," as well as practices such as inaugural lectures, the oral defense, and even mortar boards, tassels, and academic robes, can all be traced to the past practices of madrasas
 Muslim Heritage, 25 Mar. 2008. <www.muslimheritage.com/topics/default.cfm?ArticleID=447>
 Renaissance in Fex, Times Meg. October, 24, 1960. http://www.time.com/time/magazine/article/0,9171,871798,00.html
 Uzma Anzar. Islamic Education: A Brief History of Madrassas With Comments on Curricula and Current Pedagogical Practices. Mar. 2003. <www.uvm.edu/~envprog/madrassah/madrassah-history.pdf>
 Philip Hitti. History of the Arabs. (New York: MacMillian Co. 5th ed., 1951) 628.
 A. H. Nayyar. “Madrasah Education-Frozen in Time” Education and the State; Fifty Years of Pakistan, ed. Pervez Hoodbhoy (Oxford Press, 1998) 218.
 Philip Hitti. History of the Arabs. (New York: MacMillian Co. 5th ed., 1951) 412.
 Hussain Haqqani. “Islam’s Medieval Outposts,” Foreign Policy Nov-Dec 2002, 61.
 Maria Rosa Menocal. “Ornament of the World: How Muslims, Christians and Jews created a culture of tolerance in medieval Spain,” Islamic Education and Conflict: Understanding the Madrassas of Pakistan, ed. Saleem Ali (Oxford University Press. Aug. 2005).
 William Dalrymple. “Inside Islam's ‘terror schools,’” New Statesman 28 Mar. 2005.
 George Makdisi. The Rise of Colleges: Institutions of Learning in Islam and the West (Edinburgh University Press: Aug. 1981)