The building of the fortress was strongly opposed by local Berbers.[1] Other Portuguese captains commanded the castle: Francisco de Miranda and Dom Pedro de Azevedo. On 12 May 1510, the king named Nicolau de Sousa as perpetual commander, but the castle was soon taken over by the local Berbers, and in December 1510 the castle had to be abandoned and the garrison relocated at Safi.