In contrast to their predecessors, the Marinids sponsored Maliki Sunnism as the official religion and made Fez their capital. Under their rule, Fez enjoyed a relative golden age. The Marinids also pioneered the construction of madrasas across the country which promoted the education of Maliki "ulama", although Sufi sheikhs increasingly predominated in the countryside. The influence of sharifian families and the popular veneration of sharifian figures such as the Idrisids also progressively grew in this period, preparing the way for later dynasties like the Saadians and Alaouites.