John began working on strengthening the Portuguese position by establishing a fortress in the interior, which could be easily supplied and reinforced by sea.
In February 1489, an expedition was launched led by Gaspar Jusarte with the mission of establishing a fort next to the Loukkos River which received its name as Gracisoa.
Aware of the Portuguese activity, the Moroccan sultan, Muhammad al-Wattasi, rushed to the fort in an attempt to dislodge them from there.
[3][4] As summer approached, the Moroccan tribes came from the hills and began surrounding the Portuguese fort, harassing the enemy.
In July, Muhammad had arrived to participate in the siege with a force of 4,000 cavalry and a large amount of infantry.