The village of Castro Marim, which originally developed within the walls of the Castle, was head of the Order of Christ at the behest of Pope John XXII. At the time when the fighting against the Moors ceased, causing a decrease in the military importance of the castle and the village, there was a depopulation of the place, so the regent D. Pedro took action and withdrew the title conquered him, transferring this Order for Tomar (c.1356).
Inside the Old Castle, of square plan, four towers and tower of menenation, was a township. Next to the keep there was a steeple, that would be that of the Church of Santiago built in the fourteenth century.
This church was parochial of the parish, since in 1320 already it covered the whole area of the county.
It was the primitive matrix of the village and where was located the Convent of the Knights of the Order of Christ, in 1504 transformed into military headquarters.
It was this Mother Church accompanied by several Visits, among them those of 1518, 1534, 1535, 1538, 1554 and 1565. These gave its location between Levante and Poente, of square chapel, with access by three steps, with vault and retable- mor defined by five panels, in the middle with the image of Santiago, of magnitude. On the left side was S. João and on the other side S. Sebastião, having, however, these saints suffered alterations of location.
In the north facade there is a demarcated churchyard, putting the hypothesis in the Visitation of 1554, to make a graveyard there, because "other bands passed the narrow streets of the village", and a portal that gave access to the sacristy that had walls in mud, made at the time of the Visitation of 1535.
The body of the Church had three naves in the Visitation of 1534, because in 1518 it had only one, and on each side it had three arches with columns and stone capitals and the side aisles were with only one water, lined with wood.
In the southern band, in the middle of the facade, a door with access by six steps and, above it, a belfry with two bells and a stone with the sword of the Order of Christ. Next to the main door, inside and on the left side, a sink of holy water and a baptismal font.
The Visitation of 1565 gives the description of two lateral altars to the cross-arch, the side of the Gospel with large crucifix.
After the earthquake of 1 of November of 1755 only one wall of the church remained, reason why from that height the Mother Church happened to be in the Hermitage of Our Lady of the Martyrs, located extramuros.
After this earthquake and with the birth of Vila Real de Santo António in 1774, Castro Marim lost the influential position that had occupied for years.
Currently this church is composed of entrance porch in capialço superimposed by cross of Santiago carved, adro to W and chancel without dome and with quadrangular window to E.