One lost battle in 711 opened almost all of Visigothic Spain
In 711 a commander named Tariq ibn Ziyad sailed from North Africa to southern Spain. Watchers on shore reportedly mistook his ships for ordinary trading vessels. By July his army had beaten King Roderic near the Guadalete River, and within a few years Umayyad forces held more than two-thirds of the peninsula.
The kingdom Tariq invaded was fragile at the top. The Visigoths had governed Hispania for about three centuries, yet they made up only 1 to 2 percent of the population. Power was so concentrated that once the royal army collapsed, the country lay open. Roderic's own claim was disputed; coins suggest a rival, Achila II, kept ruling the northeast until about 713, and the Chronicle of 754 calls Roderic a usurper.
Reinforcements came fast. In 712 Tariq's superior, Musa ibn Nusayr, crossed with around 18,000 mostly Arab troops, took Seville, beat Roderic's supporters at Mérida and joined Tariq at Talavera. The next year the combined armies pushed into Galicia and the northeast, capturing León, Astorga and Zaragoza. Many towns, Pamplona among them, surrendered on negotiated terms that spared their people.
The deal struck with Theodemir, a Visigothic count based in Murcia, became a model. In 713 he accepted Umayyad overlordship in return for keeping his lands, his government and his subjects' Christian faith, provided he paid tribute and handed over rebels. The same protection covered seven more towns, and for many ordinary inhabitants daily life carried on much as before. By 715 Abd al-Aziz ibn Musa was governing al-Andalus from Seville.
The advance did not stop at the Pyrenees. Raids into Gaul began by 717, and Barcelona and Narbonne fell by 719. Yet the mountains of the far north never fully submitted. At Covadonga in Asturias, Pelagius defeated an Umayyad army and kept a Christian foothold alive. Abd al-Rahman I finished consolidating Umayyad rule by 781, and that northern refuge later became the launching point of the long Reconquista.
Source: Muslim conquest of the Iberian Peninsula