The Castle of Alarcón, of Arab origin, initially depended on the emirate of Córdoba. After the decomposition of the Cordovan Caliphate and the formation of the Taifa kingdoms, it was subordinated to that of Toledo. In 1184, Fernán Martínez de Ceballos, captain of the troops of Alfonso VIII, besieged the fortress for nine months and conquered it on the day of Saint Andrew.