In the late 15th century, the Portuguese, envious of the city’s trade and strategic position, captured the city and renamed it Mogador. In 1506, Manuel I, the king of Portugal, ordered that a fortress be built in Mogador. This fortress was named “Castelo Real de Mogador.” The ramparts and cannon remain to this day.