They used this patronage to encourage the loyalty of the country's influential but independent religious elites and also to portray themselves to the general population as protectors and promoters of orthodox Sunni Islam.[9][54] Finally, madrasas also played an important role in training the scholars and elites who operated the state bureaucracy.[54] Fez has traditionally retained an influential position as a religious capital in the region, exemplified by the famous University of al-Qarawiyyin.