His personal history is that of many medieval kings. He succeeded to the throne, in infancy, on the death of his father, Sancho. Though proclaimed king, he was regarded as a mere name by the unruly nobles to whom a minority was convenient. The devotion of a squire of his household, who carried him on the pommel of his saddle to the stronghold of San Esteban de Gormaz, saved him from falling into the hands of the contending factions of Castro and Lara, or of his uncle Ferdinand of León, who claimed the regency.
The loyalty of the town of Ávila protected his youth. He was barely fifteen when he came forth to do a man's work by restoring his kingdom to order. It was only by a surprise that he recovered his capital Toledo from the hands of the Laras. His marriage with Leonora of Aquitaine, daughter of Henry II of England, brought him under the influence of the greatest governing intellect of his time. Alfonso VIII was the founder of the first Spanish university, the studium generale of Palencia, which, however, did not survive him.