Badis is a former town in Morocco located 110 km southeast of Tétouan. It was once part of the Kingdom of Nekor and was used by many dynasties as a naval base. The population engaged in fishing and piracy and was home to many native peoples, including the Banu Yattufat (Ait Yitufut). Badis had an arsenal and shipyards and was an important city under Abu Said, the Marinid sultan. In 1526, the Wattasid sultan Abu Hassun made it his seat in exchange for ceding the Rif to him. This led to the Ottoman allies in Algiers making it a nest for pirates operating in the Strait of Gibraltar. The Saadid Sultan Abdallah al-Ghalib eventually ceded the city and island to Spain, prompting its evacuation and eventual downfall. Nowadays, there is a rocky islet near the site called Hajar Badis, which is still under Spanish control linguistically known as Peñón de Vélez.