The Kingdom of Asturias (; ) was a kingdom in the Iberian Peninsula founded by the Visigothic nobleman Pelagius. It was the first Christian political entity established after the Umayyad conquest of Visigothic Hispania in 718 or 722. That year, Pelagius defeated an Umayyad army at the Battle of Covadonga, in what is usually regarded as the beginning of the Reconquista.

History 
The Asturian kings would occasionally make peace with the Muslims, particularly at times when they needed to pursue their other enemies, the Basques and rebels in Galicia. Thus Fruela I (757–68) killed 40,000 Muslims but also defeated the Basques and Galicians, and Silo (774–83) made peace with the Muslims but not with the Galicians. Under King Alfonso II (791–842), the kingdom was firmly established with Alfonso's recognition as king of Asturias by Charlemagne and the Pope. He conquered Galicia and the Basques. During his reign, the holy bones of St James the Great were declared to be found in Galicia, in Compostela (from Latin campus stellae, literally "the field of the star"). Pilgrims from all over Europe opened a way of communication between the isolated Asturias and the Carolingian lands and beyond. Alfonso's policy consisted in depopulating the borders of Bardulia (which would turn into Castile) in order to gain population support north of the mountains. With this growth came a corresponding increase in military forces. The kingdom was now strong enough to sack the Moorish cities of Lisbon, Zamora and Coimbra. However, for centuries to come the focus of these actions was not conquest but pillage and tribute. In the summers of 792, 793 and 794 several Muslim attacks plundered Alava, and the heart of the Asturian kingdom, reaching up to the capital, Oviedo. In one of the retreats, Alfonso inflicted a severe defeat on the Muslims in the swampy area of Lutos, killing 70,000.

When Alfonso II died, Ramiro I (842–50) staged a coup against the Count of the Palace Nepotian, who had taken the throne. After a battle on a bridge over the river Narcea, Nepotian was captured in flight, blinded and then forced into monastic life. Early in his reign, in 844, Ramiro was faced with a Viking attack at a place called Farum Brecantium, believed to be present-day Corunna. He gathered an army in Galicia and Asturias and defeated the Vikings, killing many of them and burning their ships. In 859, a second Viking fleet set out for Spain. The Vikings were slaughtered off the coast of Galicia by Count Pedro. The considerable territorial expansion of the Asturian kingdom under Alfonso III (866–910) was largely made possible by the collapse of Umayyad control over many parts of Al-Andalus at this time. Between the years 866 and 881, the western frontier of the kingdom in Galicia was expanded into the northern part of modern-day Portugal. The year 878 saw a Muslim assault on the towns of Astorga and León. The expedition consisted of two detachments, one of which was decisively defeated at Polvoraria on the river Orbigo, with an alleged loss of 13,000 men. In 881, Alfonso took the offensive, leading an army deep into the Lower March, crossing the Tagus River to approach Mérida. Then miles from the city the Asturian army crossed the Guadiana River and defeated the Umayyad army on "Monte Oxifer", allegedly leaving 15,000 Muslim soldiers killed. Returning home, Alfonso devoted himself to building the churches of Oviedo and constructing one or two more palaces for himself.

The Kingdom of Asturias transitioned into the Kingdom of León in 924, when Fruela II of Asturias became king with his royal court in León.