[Sidenote: Alfonso VIII and the overthrow of the Moslems.]
The next following reigns had their share of internal strife and one important event in the course of the Moslem wars,--the defence of Calatrava in 1158 by two Cistercian monks, who procured an army by proclaiming a crusade. Out of this event there came the founding in 1164 of the important military order of Calatrava. Alfonso VIII (1158-1214) inherited the throne of Castile while still a child. War and disorder followed until 1180, for the kings of León and Navarre and various nobles endeavored as usual to profit for themselves at the expense of the newly enthroned monarch. At length Alfonso VIII, who was one of the ablest rulers of this period (both in internal organization and in external conquest), directed his attention to the reconquest from the Moslems. After a rapid succession of victories he was defeated, as already noted, at the battle of Alarcos, on which occasion the kings of León and Navarre failed to accord him the aid they had promised. Wars followed against the two kings, but matters were at length adjusted and a tremendous army, including many foreigners, was raised to combat the Almohades. All seemed to be imbued with the crusading spirit, but most of the foreigners deserted before the issue presented itself. Nearly all the peoples of Christian Spain were represented in Alfonso’s host, however, and together they won the great battle of Navas de Tolosa in 1212.
[Sidenote: The independence of Portugal.]
Meanwhile, the counts of Portugal had continued their policy of complete separation from León and Castile, and had also extended their frontiers southward by successful wars against the Moslems. Affonso Enríquez took the title of king, and this was recognized in 1143 by Alfonso VII, subject to the vassalage of the Portuguese monarch to León. Affonso Enríquez managed to avoid this condition by submitting his state to the sovereignty of the pope, who accepted it in 1144, though conferring only the title of duke on Affonso. A few years later Pope Alexander III recognized the Portuguese ruler as king. Thus Portugal withdrew from the current of peninsula unity, and established her independence in law and in fact.