In its beginnings it was an Arab fortress, built by the Berber tribe of the Miknasa towards the XII century.
Nos seus inicios era unha fortaleza árabe, construída pola tribo berbera dos Miknasa ao redor do século XII.