Alfonso II of Asturias (c. 760 – 842), nicknamed the Chaste, was the king of Asturias during two different periods: first in the year 783 and later from 791 until his death in 842. Upon his death, Nepociano, a family member of undetermined relation, attempted to usurp the crown in place of the future Ramiro I.
During his reign, which covered a span of 51 years, Alfonso discovered the supposed tomb of apostle Santiago in the town of Compostela, which later became known as the city of Santiago de Compostela.
He was the son of Fruela I and the Basque Munia.
He was born in Oviedo in 759 or 760. He was put under the guardianship of his aunt Adosinda after his father's death, but one tradition relates his being put in the monastery of Samos. He was the governor of the palace during the reign of Adosinda's husband Silo. On Silo's death, he was elected king by Adosinda's allies, but the magnates raised his uncle Mauregatus to the throne instead. Alfonso fled to Álava where he found shelter with his maternal relatives. Mauregatus was succeeded by Bermudo, Alfonso's cousin, who abdicated after his defeat at the Battle of the Burbia River.
Alfonso was subsequently elected king on September 14, 791. Poets of a later generation invented the story of the secret marriage between his sister Ximena and Sancho, count of Saldana, and the feats of their son Bernardo del Carpio. Bernardo is the hero of a cantar de gesta (chanson de geste) written to please the anarchical spirit of the nobles.
On accession to the throne, Hisham I, son of Abd al-Rahman I, commenced a string of military campaigns in the eastern Pyrenees and to the north-west. In 794, a raid spearheaded by Abd al-Karim dealt a major military blow to Alfonso II on the eastern fringes of the Kingdom of Asturias (Cantabria and Castile). The Asturian king asked for the assistance of the Basque Frankish vassal Belasco, master of Álava and bordering regions at the time. Abd al-Karim advanced deeper west into Asturias and pillaged the region, while his brother Abd al-Malik ventured into the western Asturian lands.