Alfonso III of Asturias

Sampiro describes these events as follows: A messenger arrived from Álava, announcing that their hearts had inflated against the king: hearing that, the monarch decided to march there.

Driven by the fear of their arrival, they quickly recognized their obligations and supplicants, lowered their heads before him and promised that they would remain faithful to his kingdom and authority, and that they would do what was commanded.

In 878, the army of King Alfonso III, with Count Hermenegildo Gutiérrez in command, faced the Muslim forces led by the emir of Cordoba, Mohammad I, who had started an attack against Porto.

After defeating the emir's forces and expelling the Muslim inhabitants of Coimbra and Oporto, Gutiérrez' Christian troops occupied and repopulated other cities, such as Braga, Viseo and Lamego, with men taken from Galicia.

[clarification needed] Accordingly, in 878, Al-Mundir directed his armies back to Leon and Astorga, while Salid ben Ganim reached the Órbigo.

Alfonso, hoping to prevent the union of both armies, went out to meet the second, which he defeated in the battle of Polvoraria, at the confluence of the Órbigo and Esla rivers.

Both kings considered the truce as a pause while preparing for the next assault: Mohamed raised a fleet to attack Galicia, but it was destroyed by a storm.

Alfonso and Ibn Marwan descended through the Tagus Valley and defeated the Cordovan army on Mount Oxifer, next to the Guadiana River.

The great king was met with a rising led by his brothers Fruela, Odoario and Bermudo, who became strong in Astorga, supported by several counts, but were quickly defeated and executed.

In 901 the Umayyad rebel Ibn al-Qitt proclaimed Mahdi, preached holy war and attacked Zamora - "rebuilt and repopulated by Mozarabic Toledo [...] the most important advanced square of the Asturian kingdom" - which he was able to resist.

According to a letter of disputed authenticity dated to 906, the Epistola Adefonsi Hispaniae regis, Alfonso arranged to purchase an "imperial crown" from the cathedral of Tours.