The oldest existing and continually operating educational institution in the world is the University of Karueein, founded in 859 AD in Fez, Morocco.
Dating back to 859, the University is no doubt older than Egypt’s Azhar University (970) and its European counterparts: the University of Oxford, which is regarded as the oldest university in the English-speaking world (roughly founded in 1096), and University of Bologna (founded approximately in 1088). The historic university of Fez is actually recognized by the Guinness Book of World Records as the oldest degree-granting university in the world. Moreover, UNESCO considers Al-Karaouine to have been a university since its founding.
Originally founded as a mosque, with an associated mosque school (madrasa) for the purpose of providing a place for the community to practice their religious rituals in comfort, the place of worship soon developed other functions. It became a place of religious instruction and Quran memorization, Arabic grammar, mathematics, music, chemistry, islamic legislation, Sufism, medicines, astronomy, as well to study political debate and lessons focusing mainly on the natural sciences. The mosque later on set-up the rest of its urban infrastructure. It was surrounded by places of lodging, businesses, “Hamams” – steam rooms, schools, etc. many of which still function properly today.
After the construction of the mosque, the scholars of Fez were able to make it a better place for education and scientific research that attracted many students from different parts of the world. Thanks to the successive dynasties that governed the city of Fez, Al Karaouin mosque was expanded until it became the largest in Africa, with a capacity of 22,000 worshipers, and turned into a scientific center advancing the prestigious educational centers in Cordoba and Baghdad.