Kingdom of Asturias followed by Kingdom of León
When he succeeded his father Ramiro, Ordoño I (850–66) repressed a major revolt amongst the Basques in the east of the kingdom. In 859, Ordoño besieged the fortress of Albelda, built by Musa ibn Musa of the Banu Qasi, who had rebelled against Cordoba and became master of Zaragoza, Tudela, Huesca and Toledo. Musa attempted to lift the siege in alliance with his brother-in-law García Iñiguez, the king of Pamplona, whose small realm was threatened by the eastwards expansion of the Asturian monarchy. In the battle that followed, Musa was defeated and lost valuable treasures in the process, some of which were sent as a gift to Charles the Bald of Francia. Seven days after the victory, Albelda fell and, as the chronicler records, "its warriors were killed by the sword and the place itself was destroyed down to its foundations." Musa was wounded in the battle and died in 862/3; soon thereafter, Musa's son Lubb, governor of Toledo, submitted himself to the Asturian king for the rest of Ordoño's reign.
When Alfonso III's sons forced his abdication in 910, the Kingdom of Asturias split into three separate kingdoms: León, Galicia and Asturias. The three kingdoms were eventually reunited in 924 (León and Galicia in 914, Asturias later) under the crown of León. It continued under that name until incorporated into the Kingdom of Castile in 1230, after Ferdinand III became joint king of the two kingdoms.