The Castillo de Ubierna, situated 18 kilometers north of Burgos in the Merindad de Río Ubierna region, rests among rocky outcroppings overlooking communications between Burgos and northern territories. Constructed in 884 by order of King Alfonso III, this fortress held significant strategic value during the 11th century when it became fiercely contested between Castile and Navarra. Following the decisive Battle of Atapuerca in 1054, the castle and surrounding lands became permanently incorporated into the Castilian kingdom. Ownership passed through illustrious hands including the Counts of Castile, Diego Laínez, and the renowned warrior Rodrigo Díaz de Vivar, the Cid. Protected as a Cultural Heritage Site since 1949, the fortress survives as partial ruins that reveal its rectangular plan and defensive character adapted to the rocky terrain. Remaining walls provide clear evidence of a fortress built to control a vital mountain pass.