The Marinid dynasty was composed of Berber tribes of the race of the Zenetes (Zenatas), as opposed to the Hilalian Arabs, and were under the rule of the Almohads. But early in the 12th century, they turned against a weakening Almohad to build a dynasty that lasted nearly two centuries.[13] With the defeat of the last of the Almohads and the capture of Marrakech in 1269, the Marīnids, under Abū Yūsuf Yaʿqūb, became masters of Morocco.[14]