By 1217 AD, the Almohad dynasty was collapsing. One of the generals, Abu Yusuf, took over control of Morocco and made himself Sultan. That started the Marinid dynasty. All the Marinid rulers were army men like Abu Yusef,. They were mostly cavalry riders.
A tour of Fez
The Marinids made their capital city at Fez, and tried over and over to reunite the old Almohad empire by conquering their neighbors, the ‘Abd al-Wazids and the Hafsids. But they couldn’t do it. When the Marinids tried to attack Spain, they failed there too. But they did manage to keep control of Morocco and the trade through the Straits of Gibraltar.
Another important city of the Marinid kingdom was Tangier, which was the home of the geographer and traveler Ibn Battuta. The Marinids ruled Morocco until 1465 AD, when the Ottomans conquered them. So the first Portuguese explorations down the coast of West Africa to kidnap slaves stopped to visit the Marinid kingdom.