The Almohad dynasty had been ruling in Marrakesh and much of Spanish Andalusia for the last century. It wasn’t materially different from the Almoravids before or the Marinids after it; at this point, West and North Africa had settled into a theological and cultural way that didn’t change. In earlier centuries, it had been a volatile area that swung from Sunni to Shi’ite and back, so that it birthed the Fatimid Shi’ite dynasty that built Cairo. But after the Medina-based Maliki theology took root, it stuck.
So the change, in 1269, from the last Almohad Caliph Idris to the first Marinid Caliph Abu Yusuf Yaqub, wasn’t a sea change for the population. It would have had a big effect on the ruling class, who needed to bend the knee to a new set of officials. The seat of government, too, drifted from Marrakech to Fez, where the Marinids built up wealth and power. Fez’s height of intellectual influence was during the 1300s, when the Marinids were at their peak.
During this time, the Empire of Mali also arose. It had been established roughly in 1230, but its power took time to grow. Its conquest of Sosso, a caravan-trade-route kingdom of the 12th century, established it as the new receiver of oasis fees and taxes. The ruler of the Mali Empire was called the Mansa, a Mandinka word for Sultan. They were devout Maliki Muslims, like the Marinids to the north. Mansas went on Hajj to Mecca, traveling through Timbuktu and Egypt. They had friendly relations with the Sunni Mamluks of Cairo.
Mansa Musa Keito, who was born around 1280, was the most famous Mansa of Mali. He was made Regent when the Mansa before him decided to explore the Atlantic Ocean and never came back. In 1312, Musa became Mansa on his own. He was one of the richest men in history, apparently controlling the world market price of gold with his own personal actions (by giving too much, he devalued it, and had to fix this by borrowing a lot of it back). Mali was the leading producer of gold at this time.
Timbuktu’s population began to increase during the Mali Empire period. In the time of Mansa Musa, it probably had 10,000 people living on the edge of the Sahara. (Its odd location seems to have marked the outside limits of the annual Niger River flood.) Its famous mosque made entirely of mud and straw was built during the 14th century, though the one we see now was probably a renewed model built when the population had grown even larger, in the 1500s. Of course, it was a center for Maliki scholarship. In our time, its residents made a huge effort to rescue most of the books and scrolls from the mosque before rebels in Mali’s civil war could burn them.