In 1505, the Portuguese, already installed on the Moroccan coast, founded a trading post and a fortress at the foot of the hill in front of the sea, Santa Cruz do Cabo de Aguer (Holy Cross of Cape Ghir), on the site of the district which has now disappeared. de Founti (named after the Portuguese word font which means fountain). Founti and the Casbah in 1905.
Quickly, the Portuguese came up against hostility from the tribes of the region. From 1530, they were stranded in Santa Cruz. The Portuguese ebb began when on March 12, 1541, Sharif Saadien Mohammed ech-Sheikh seized the fortress of Santa Cruz de Aguer. Six hundred Portuguese survivors are taken prisoner, including Governor Guterre de Monroy and his daughter Dona Mecia. The captives are redeemed by monks, who came especially from Portugal. Dona Mecia, whose husband had been killed during the battle, becomes the wife of Mohammed ech-Cheikh but dies in childbirth, in 1544. The same year, Mohammed ech-Cheikh releases Governor Guterre de Monroy, whom he had befriended11.
The Portuguese positions in Morocco, acquired between 1505 and 1520, are on the decline. After the loss of Agadir, the Portuguese must abandon Safi and Azemmour. Morocco begins to have less importance for Portugal which is now turning to India and Brazil. After 1550, the Portuguese held only Mazagan (now El Jadida), Tangier and Ceuta in Morocco