The fall of the Visigothic monarchy marked the beginning of the Islamic phase of Spain's history. From 711 to 1492, Muslims controlled varying portions of Iberia, and their long presence had a profound influence on Spanish culture long after they lost political control. From their origins in the Arabian Peninsula during the time of the prophet Muhammad (c. 570–632), the Muslims spread quickly and widely throughout the Middle East and across North Africa. They conquered cities as they went, fighting when they had to and making deals with local authorities when they could. People who came under Muslim authority had the option of converting to Islam, but they did not have to do so to live peaceably under their new overlords. Christians and Jews, considered “People of the Book” or fellow monotheists, could retain their religion and customs if they refrained from proselytizing, if they paid special taxes, and if they agreed to political restrictions preventing them from having authority over Muslims.
The historical sources, both Christian and Muslim, for the end of the Visigothic monarchy and the conquest and establishment of Islamic Spain are not abundant and come from later periods. Contemporary accounts are not available, and later ones are contradictory and contain legendary accretions. Nonetheless, scholars generally agree on the main outlines of the early years of Muslim consolidation in Spain.
After the defeat of King Roderick in southern Spain, the Muslim commander Ṭāriq ibn Ziyād, commanding a mainly Berber army, sent troops toward Córdoba. They defeated a remnant of the Visigoths on the way and took the city after a long siege. Ṭāriq accepted the allegiance of disaffected groups in the area, including significant elements of the Jewish communities, a segment of the population oppressed by the Visigoths and especially discontented. Ṭāriq himself moved on Toledo, the Visigothic capital, which his forces easily captured, while a detachment of his army secured Córdoba. His immediate overlord Mūsā ibn Nasayr, governor of northwest Africa, arrived in Spain with a force of 18,000, many of them Arabs, and conquered Carmona, Seville, and Mérida. Ṭāriq and Mūsā joined forces in Toledo and wintered there. During the following year Ṭāriq went to the northwest while Mūsā secured the Ebro valley, thanks in part to the conversion to Islam of two prominent Christian families, who remained in control of the local area as the Banū Qasī and the Banū Amrūs.