The semicircular towers and curtain wall of Baños de la Encina Castle above the olive groves of Jaén province

© Castles & Palaces

Baños de la Encina Castle

Castillo de Baños de la Encina

Spain · Andalusia · Near Bailén

Built 968 · Umayyad Caliphate military architecture; rectangular enceinte with 14 semicircular towers and one square tower (Torre del Homenaje); original Moorish fabric with minimal later alterations

🎟Entry from 4 per adult

Quick Facts

🕐
Hours
Visiting hours are limited and can shift seasonally; the guided tour (t1039248) is the most reliable way to secure access. Check the town hall's tourism page before travelling, as opening times depend on volunteer staffing.
🎟️
Entry from
€4
Duration
1 hour
🌤
Best time
March to June, September to November
🚂
Nearest city
Bailén
Get Tickets & Tours →

Highlights

  • A dated foundation inscription above the gate reading 968 AD — an exceptionally rare degree of precision for any medieval castle, carved in Arabic by order of the caliph who built it
  • Fourteen semicircular towers connected by a curtain wall, the classic Umayyad military formula optimised for flanking fire against attackers scaling the walls
  • A horseshoe-arched gatehouse with blind decorative arcading sharing the same architectural vocabulary as the Great Mosque of Córdoba
  • Almost entirely original 10th-century Moorish fabric, with no significant rebuilding since the Reconquista — one of the most intact Umayyad castles anywhere in Spain
  • A small, unspoiled village below the walls with no chain hotels and no tourist infrastructure beyond the castle itself

Skip the queue with a guided tour

Skip-the-line tickets & expert guides

See Tours →

On the northern edge of Andalusia, where the Sierra Morena mountains meet the Guadalquivir valley, stands one of the most perfectly preserved Moorish military castles in Spain — and one of the least known. Baños de la Encina carries a dated foundation inscription above its gate: 968 AD. That kind of precision is exceptionally rare; most medieval castles can only be dated approximately, by stylistic comparison or documentary inference. This one comes with its own birth certificate, carved in Arabic by order of the Umayyad caliph who commanded it built.

The gateway arch bears a dedication inscription from Caliph al-Hakam II, son of Abd al-Rahman III, who had built the Alcazaba of Almería only thirteen years earlier. Father and son raised the two most intact Umayyad military castles surviving in Spain within a decade of each other. Baños de la Encina was built specifically to control the mountain pass linking Córdoba to Toledo — the strategic route threading through the Sierra Morena that any army or caravan moving between the Caliphate's heartland and the contested northern frontier had to use.

The architecture follows the classic Umayyad military formula with unusual completeness: fourteen semicircular towers connected by a continuous curtain wall, a layout optimised to give defenders overlapping fields of flanking fire against anyone attempting to scale the walls between towers. A single square tower, the Torre del Homenaje, or keep, stands at the highest point of the enclosure, visually and functionally distinct from the rounded towers around it. The horseshoe-arched gatehouse is the formal showpiece of the whole complex — a double arch framed by decorative blind arcading that shares its architectural vocabulary directly with the Great Mosque of Córdoba, built under the same dynasty in the same century.

What makes Baños de la Encina especially valuable is what did not happen to it. The castle has not been significantly rebuilt since the Reconquista; what visitors see today is overwhelmingly original 10th-century Moorish construction, not a later reinterpretation or romantic restoration like so many of Spain's other castles. Alfonso VII of Castile captured it in 1147 during his campaign across the Sierra Morena, and it changed hands between Moorish and Christian forces several more times before coming under permanent Castilian control in the 13th century. The Christian lords who held it afterward made few alterations — the keep was used mainly for storage and the castle functioned as a garrison rather than a residence to be modernised. That neglect, paradoxically, is exactly why the Moorish fabric survived so completely intact.

The village of Baños de la Encina, with a population of around 2,500, sits below the castle walls and preserves its medieval street pattern alongside several Renaissance-era churches. It is the kind of place that has not changed fundamentally in four centuries — no chain hotels, no tourist apparatus beyond the castle itself. For visitors looking to encounter rural Andalusia without the infrastructure built around Seville, Córdoba or Granada, this is one of the most genuinely unmediated stops in the province of Jaén.

That lack of change has an economic explanation as much as a historical one. The province of Jaén produces more olive oil than any other province in Spain — more, in fact, than most entire countries — and the Sierra Morena foothills visible from the castle's towers are carpeted in olive groves in every direction. Rural Jaén has its own economy, rooted in olive cultivation rather than tourism, which is part of why so much of it, including this castle, has remained so quietly intact.

History

Caliph al-Hakam II of the Umayyad Caliphate of Córdoba ordered the construction of the castle in 968 AD, a date preserved in a dedication inscription carved above the gateway — one of the most precisely dated medieval fortifications in Spain. The site was chosen to control the strategic mountain pass through the Sierra Morena linking Córdoba to Toledo, a route of major military and commercial importance to the Caliphate. Al-Hakam II's father, Abd al-Rahman III, had built the comparably intact Alcazaba of Almería only thirteen years earlier, and the two castles together represent the high point of Umayyad military architecture surviving in Spain.

Alfonso VII of Castile captured the castle in 1147 during a campaign across the Sierra Morena, part of the broader Christian advance into al-Andalus during this period. Control of the fortress passed back and forth between Moorish and Christian forces over the following decades before falling under permanent Castilian control in the 13th century. Unlike many captured Moorish fortifications, Baños de la Encina was not extensively rebuilt by its new owners — it served mainly as a garrison and storage point rather than a residence requiring modernisation, and that minimal intervention is the principal reason its 10th-century Moorish fabric has survived so completely to the present day.

How to Visit

Getting there: The castle is 20km from Bailén, a junction town on the A-4 motorway between Madrid and Granada, and about 50km from Jaén city. There is no direct public transport from major cities, so a car is recommended.

The guided tour: The guided tour (t1039248) covers the castle together with two other monuments in the town and is the most reliable way to secure access, since opening hours depend on volunteer staffing and can be unpredictable for independent visits.

Combine with: The nearby Desfiladero de Despeñaperros Natural Park, where the Sierra Morena pass follows a spectacular gorge used by armies and traders since antiquity, makes a natural addition to a visit and helps explain why this exact location was chosen for a fortress in the first place.

Frequently Asked Questions

A dedication inscription carved above the gateway records the year 968 AD and names Caliph al-Hakam II as the builder — an unusually precise date for a medieval fortification, most of which can only be dated approximately through stylistic or documentary evidence. The inscription is one of the castle's most historically valuable features, fixing its construction within the wider programme of Umayyad military building under the Caliphate of Córdoba.

Location

C. Castillo, s/n, 23711 Baños de la Encina, Jaén, Spain

Nearby Castles

Featured Tour

Baños de la Encina: Three Monuments Guided Tour

0 (0)·2.5 hours
From $16Guided tour
Book This Tour →

Cancellation available · Instant confirmation

Tours & Tickets

Powered by GetYourGuide

Entry from

4/ adult

See Tours →