The town of Castro Marim lies close to the mouth of the river Guadiana on the border between Portugal and Spain. It is the site of an ancient settlement on a steep-sided hill that was visited by the Phoenicians, Greeks and Carthaginians. This settlement was rebuilt by the Romans and later occupied by the Moors from North Africa. It was the Moors who built the first castle, a small square fortification with round towers at each corner.
Castro Marim was recaptured from the Moors in 1242, following which the Portuguese kings had walls built around the town (which occupied the same hill as the castle) and transformed it into a border fortress to defend the Algarve against the Moors and the Kingdom of Castile. The hill on which Castro Marim was built dominated the plains around it, apart from a ridge of high ground a short distance to the south. This ridge was not a problem in medieval times, when siege artillery was not very powerful and did not have very long range.
However with the advent of gunpowder artillery the high ground to the south of the castle became a serious weakness. In 1580 Spain and Portugal were united, so there was no need for the border to be defended and no artillery fortifications were constructed. In 1640 the Portuguese revolted against King Philip IV of Spain and war broke out between Portugal and Spain. Castro Marim once more became an important fortress, protecting the Algarve against the Spanish.
At this point the fortifications still consisted of the old castle and the medieval walls around the town, so King João IV of Portugal ordered the construction of modern artillery defences. This was extensive project that entailed a new line of bastioned fortifications extending down from the castle and round the heights to the south. This line culminated in a small self-contained fort at the highest point. This fort, called the Forte de São Sebastião, had two half-bastions facing north and another two half-bastions facing the south.
On the west side of the fort there was a hornwork the faced to the west. The hornwork protected the western approach to the ridge, and its left flank was protected by the Forte de São Sebastião. The hornwork also flanked the western wall that ran north towards the town. This wall had no bastions of its own but it zig-zagged down the hill and back up to the town. The rear of the hornwork was walled off, allowing it to be used as a self-contained fort along with the Forte de São Sebastião.
To the east of the Forte de São Sebastião there was a more regular bastioned trace of three bastions (a large central bastion with two half-bastions either side). A long straight wall ran from the eastern half-bastion up to the east end of the old town to the north. This wall was flanked from the north by a half-bastion built just below the medieval walls of the town. There was no ditch or covered way and for most of the circuit the steep rocky ground would have made it very difficult to dig one. An attacker would have experienced the same difficulty when trying to dig trenches or batteries to advance towards the fortress.
The east end of the ridge was not as high, but it extended beyond the new walls and would have provided a good route for an attacker. To defend this thin section of high ground, the Portuguese engineers built a curved battery at its east end. This work was known as the Revelim de Santo António after the existing hermitage that it was built around. The Revelim de Santo António faced towards Spain and overlooked the flat, marshy ground between the river and Castro Marim. It was linked to the main fortress by a wall running along the north side of the ridge. A short distance farther east there was another battery, the Bateria do Registo, which guarded a channel leading to the river.
Finally, the walls of the old town itself were adapted for artillery. This involved reducing the height of the existing medieval walls. Three artillery platforms were also built into the medieval walls. Two of these were at the east and west ends of the town, where they met the new walls. The guns in these platforms covered the walls linking the old town to the southern ridge. The third platform was on the south side, overlooking the low ground between the town and the ridge.
At first sight it seems strange that the improvements to the medieval wall were relatively minor compared to the extensive works that were constructed on the ridge. No bastions were added to the walls, which left them with little or no flanking cover for most of their circuit. The most obvious explanation for this is that the slope on the north side of the old town is so steep that it was almost impossible to assault. As such, the protection offered by the medieval walls was still considered sufficient here. On the south side there was no need for reinforcement, since the new fortifications effectively blocked any attack from this direction. The main value of the old town was its height, and this advantage was exploited by the three artillery platforms described above.
In 1755 the Algarve was struck by the Lisbon Earthquake, which damaged the fortifications of Castro Marim and partially destroyed the town. The fortifications were repaired but the town was not rebuilt. Instead, new houses were constructed at the bottom of the hill. At first the new town lay to the south of the old town, between the two linking walls, but it later expanded beyond the walls.
Visiting Castro Marim
As the town of Castro Marim grew, the gates and most of the linking walls between the old town and the ridge were demolished to make way for new houses. However the rest of the fortress has survived intact. The old town (now known as the castle of Castro Marim) is in relatively good condition and can be visited (2012 entrance free: €1). The castle contains a small archeological museum and several displays on the history of the region. In August there is an event called the Dias Medievais (Medieval Days) that centres around the castle, but also extends to the town and the southern fortifications.
In recent years the southern fortifications and the Forte de São Sebastião have undergone extensive restoration, so they are now in excellent condition, resembling their original white appearance. Access is good, although the Forte de São Sebastião and the hornwork are still not open to the public regularly. It is hoped that when the restoration is finally complete then these will be open to visitors as well.
The Revelim de Santo António has also been restored and can be visited free of charge. On the same hill stands the hermitage and an old windmill, as well as a cultural interpretation centre. The Bateria do Registo, down a small track on the other side of the main road, can be seen from the Revelim. It has not been restored and is in poor condition.