The square sandstone fortress on the southern edge of Tarifa was built in 960 by the Caliph Abd al-Rahman III as part of the chain of Moorish strongholds along the Strait. It is one of the oldest more or less intact castles in Spain, with horseshoe-arched gates, a long curtain wall, and a central courtyard that has held everything from a Visigothic chapel to a nineteenth-century barracks.
The visit is brisk — an hour is enough — but the ramparts give the best views in town, looking out over Isla de Las Palomas, the harbour, and on a clear day the Rif mountains across the strait. Inside, a small museum traces the siege of 1294 and the centuries during which Tarifa marked the front line between Christian and Muslim Spain.