Various vestiges encountered in the immediate surroundings suggest that a Lusitanian castro may have existed on the site, during the transition from the Neolithic to Chalcolithic periods.
The Phoenicians came to this region at the end of the 10th century B.C.E., establishing a trading post under the protection of the Lusitanian castro. The Greeks, in the middle of the 8th century, also founded a colony that quickly dissolved into the Lusitanian population, along with the Celts and Carthaginians.
At the beginning of the 2nd century A.D., the Romans conquered Alcoutim at a time when the settlement was a rich centre, dominated by its busy port. The fortress at its centre was transformed into a military base for the occupying forces and political centre, which became known as Alcoutinium. Taken by the Alans in 415, the main square of Alcoutinium slowly fell into ruin, owing to the decrease in mineral exports. The Moors arrived in 715, changing the name to Alcatâ, yet could not restore the historical political and economic importance to the region.
It was only during the period of the Reconquista that the Castle began to gain a specific form. Integrated into the Portuguese Crown after 1240, the monarchs took various steps to increase settlement and establish an authority within the region. They did this by reconstructing and reformulating the defences during the second half of the 13th century. In 1240, Alcoutim was taken by the forces loyal to King Sancho II of Portugal, who ordered the reconstruction of the castle and wall to defend the population. At the same time, Sancho elevated the settlement to the status of town. King Denis of Portugal restored the castle and walls during his reign, at the same time (1304) conceding a foral (charter) to the settlement, transferring its title to the Order of São Tiago. Unfortunately, little remains of the primitive medieval castle. In fact, there are no monographs that depict the transition between the Moorish settlement and early Portuguese settlements What did remain were the two ogive gates, which hinted as to its Gothic military structure.