It was built in 970 AD. as the main mosque and center of learning for the newly founded city by the new North African rulers. For over a millennium, it remains one of the most important centers of Islamic theology, where Muslim students from all over the world converge every year.