Bermudo II’s son Alfonso V succeeded him being less than five years old. While he was a minor his mother, Elvira, governed the kingdom. Whenever something of this sort occurred, the nobility tended to take advantage of the situation to gain more power.
Almanzor died in the year 1002, and although his sons attempted to follow his great deeds, al-Ándalus disintegrated and became divided into dozens of small independent kingdoms called “taifas”. The Leonese people attempted to rebuild their kingdom, but this was hindered by the nobility’s rebellions and frequent viking raids.
Around the year of 1017 Alfonso V was able to govern the kingdom of León all by himself, and in that year he set up a meeting (or “council”) of the main members of the nobility and church. There, they put together the “Charter of León”, that consisted of a body of laws for both the Leonese capital as well as the entire kingdom. It made it easier for new settlers to come to the crushed city, granting them many rights and advantages. This charter was drafted in latin, but in the s. XIII it was translated to the Asturleonese language. It would serve as an example for the majority of medieval charters throughout all of Spain. Because of this, Alfonso V was known as “The one of Good Charters” and “The Noble”.
In the summer of 1028 Alfonso V surrounded and besieged the city of Viseo in Portugal. Since it was hot, he inspected the walls without wearing any armor: an enemy crossbowman took advantage of this moment and, with one accurate shot he killed him. This is how he concluded his reign, exactly when the recovery of the kingdom of León finally felt complete.