Badis was a town in Morocco, 110 km southeast of Tétouan, between the territory of the Ghomara and the Rif; the Banu Yattufat (Ait Yitufut) live in the area.
Badis was part of the Kingdom of Nekor, and after the Idrisids, Almoravids, Almohads, and Marinids; the last three dynasties used it as a naval base.
In 1526 the Wattasid sultan Abu Hassun, dethroned by his brother, received as a feud the Rif, with his seat at Badis (for this reason he was called al-Badisi).
In 1554 he ceded the city and island to his Ottoman allies in Algiers who made it a nest for pirates operating in the Strait of Gibraltar.
The Saadid sultan Abdallah al-Ghalib saw this activity and the Ottoman presence with a very bad eye, as it could be a base for the conquest of his kingdom, and in 1564 he ceded the town and island to Spain; the Moroccan inhabitants were evacuated.