He founded the city of Chefchaouen in 1471 as a base from which to attack the Portuguese who had conquered Ceuta in 1415.