When refugee Fatima al-Fihri founded the University of Al-Qarawiyyin in 859 AD, the Muslim world was at the beginning of five centuries of the Islamic Golden Age. Resplendent in patterned mosaic, it now stands as the world's oldest operating university, amid a maze of grubby alleys in the Moroccan city of Fes.
Al-Qarawiyyin lays claim to leading advances in science, maths and philosophy through its Islam-centred teachings at a time when Europe was buckling down for the medieval Dark Ages. It is also one of the only universities in the world established by a woman, and a woman of color at that. Notable alumni include Jewish philosopher Maimonides, Muslim philosopher Ibn Rushd, and Pope Sylvester II, who is said to have introduced the Arabic numerals to Europe after a stint there in the tenth century.
Funny how a thousand years can upset reputations. Despite being established by a woman some 1,157 years ago, female students only recently began studying at Al-Qarawiyyin in any significant number. For many, Islam's much maligned public image in the West often comes down to the status of women in Muslim countries.
Broadly spoke to some female students in its main department of Islamic sharia law about their experiences at Al-Qarawiyyin and education in Morocco.
Ilhem Ibrahim, 22, says she is the first woman in her family to go to university, "not because women were barred from studying but it was social tradition to study to twelve years and then get married; now you only find this in the countryside and mountains."
"Fatima was well-educated and and rich," she explains. "She came to Fes and gave her family's money to Allah by building the university; she fasted for the 18 years it took to build."
In the years after the 1956 independence from colonial France, schooling was made compulsory in Morocco and attendance grew from just 17 percent to 85 percent of children. But despite ongoing government initiatives, drop-out rates are high and almost one in two women are still illiterate. In some rural areas, where nine in ten women are already illiterate, schooling makes little economic sense.
Read More: How Islamophobia Hurts Muslim Women the Most
Students are still more likely to be male at Al-Qarawiyyin, but Ibrahim says that she is not particularly proud of being a female student. "I don't think there are more difficulties as a woman, there are more men here, but it's down to choice," she says.
Asmaa, 20, sees her studies at Al-Qarawiyyin as less of a choice. "Allah guided me to study sharia and thank god I like it. Now I want to teach sharia, but I could use it to work in justice, the community, there are many opportunities."
While Asmaa is also the first woman in her family to go to university, she says that these days the success of her female peers at Al-Qarawiyyin is only down to their ambition. "Mentalities change, I want to do something with my life and have a supportive family," she says.
Across Morocco, 'Fassis' have an erudite reputation. Fes's culturally-endowed sons and daughters are proud of their ancient capital and still go on to take leading roles in government and society, despite France moving the seat of government to coastal Rabat in 1912.
It is a reputation that explains some of the anomalies of female education in the city too. Fellow Al-Qarawiyyin student Jihad, 20, says that her mother and grandmother before her went on to university. "It was very rare but my family have always had an open mind. The first word Allah said to the prophet was 'Iqra' [read]... actually I wanted to study economics but that college was full so I came here."
Knocking bees away from her tea in the grounds of Fes's Teachers' Club, teacher Rabiya Musi agrees that the city's history is unique: "We have a proud history of culture here, and so women, perhaps unlike other places, have done well in academia."
In Morocco, on the subject of social ills, France's occupation comes up often and demonstrates how deeply Moroccans feel it affected the country. Between 1912 and 1956, French control under a mission civilisatrice brought 'culture' to Morocco, while exporting economic benefits back home. Despite overthrowing the imperial yoke sixty years ago, college students take a French-focussed Baccalaureate exam, French is still the country's second language, and higher education is predominantly taught in the language.
During the colonial period, the French involved themselves in the affairs of Al-Qarawiyyin for the political influence it held and attempted to reform its structure to support their rule. After independence, the university was moved from the Ministry of Religious Affairs to Ministry of Education and students began calling for modernizing additions, such as upgrading to desks from mats.
"Until independence, there was just religious education and only afterwards were other subjects widely studied by Moroccans," says filmmaker Merieme Addou. "The University of Qarawiyyin is a good example of that, if you graduated from it you were seen as educated and would reach a high level in society. Women did study occasionally at Qarawiyyin, but when we say somebody was educated, it meant that they knew the Quran and everything about religion, perhaps a bit of astronomy and a kind of maths too."
Some of the most remarkable changes to women's education, however, have taken place more recently. They show how Islamic education is now being used by Moroccan women as a vehicle to advance their rights and social status.
Addou produced a film last year called Casablanca Calling on mourchidat, a new title established by the government in 2006 for educated Muslim women who want to lead religious community life. Despite being seen as a state initiative to promote its own brand of 'modern Islam,' it is nonetheless radical. "They can now do anything that male imams can do, besides lead prayers, such as give personal and religious advice and enter the male part of the mosque. For the first time ever in a Muslim state, women can become official religious leaders," Addou tells Broadly.
While these advances come from the government, Yale scholar Meriem El-Haitami argues they are providing a new platform of influence for Muslim women to change their positions for the better. By becoming respected religious authorities, it puts them in to positions of leadership where they have the potential to reconsider Islamic thought, change the dynamics of the social structure, and contribute more widely to female social welfare. "They define a new model of activism which aims at contributing to social reform by spreading religious values," El-Haitami writes for OpenDemocracy.
What remains to be seen is what lasting impact these educated Muslim women will have on Moroccan society.
"France held back the country and stopped change," says Al-Qarawiyyin student Ilhem. "What Morocco will achieve in one hundred years, the occupation suppressed for generations. The problem is at school we do the Baccalaureate, we still want to study in France; we need to stop following France in culture and go our own path.