Question: In what century did Muslims conquer the place moors who invaded Spain came from?

full_context: Document 1: Middle Ages: The Islamic conquests reached their peak in the mid-8th century. The defeat of Muslim forces at the Battle of Poitiers in 732 led to the reconquest of southern France by the Franks, but the main reason for the halt of Islamic growth in Europe was the overthrow of the Umayyad dynasty and its replacement by the Abbasid dynasty. The Abbasids moved their capital to Baghdad and were more concerned with the Middle East than Europe, losing control of sections of the Muslim lands. Umayyad descendants took over the Iberian Peninsula, the Aghlabids controlled North Africa, and the Tulunids became rulers of Egypt. By the middle of the 8th century, new trading patterns were emerging in the Mediterranean; trade between the Franks and the Arabs replaced the old Roman patterns of trade. Franks traded timber, furs, swords and slaves in return for silks and other fabrics, spices, and precious metals from the Arabs.
Document 2: Galicia (Spain): Later the Muslims invaded Spain (711), but the Arabs and Moors never managed to have any real control over Galicia, which was later incorporated into the expanding Christian Kingdom of Asturias, usually known as Gallaecia or Galicia (Yillīqiya and Galīsiya) by Muslim Chroniclers, as well as by many European contemporaries. This era consolidated Galicia as a Christian society which spoke a Romance language. During the next century Galician noblemen took northern Portugal, conquering Coimbra in 871, thus freeing what were considered the southernmost city of ancient Galicia.
Document 3: Portugal: The Muslim population of the region consisted mainly of native Iberian converts to Islam (the so-called Muwallad or Muladi) and to a lesser extent Berbers and Arabs. The Arabs were principally noblemen from Oman; and though few in numbers, they constituted the elite of the population. The Berbers were originally from the Atlas mountains and Rif mountains of North Africa and were essentially nomads. In Portugal, the Muslim population (or "Moors"), relatively small in numbers, stayed in the Algarve region, and south of the Tagus. Today, there are approximately 800 words in the Portuguese language of Arabic origin. The Muslims were expelled from Portugal 300 years earlier than in neighbouring Spain, which is reflected both in Portuguese culture and the language, which is mostly Celtiberian and Vulgar Latin.
Document 4: Islam in Spain: Islam was a widespread religion in what is now Spain and Portugal for nine centuries, beginning with the Umayyad conquest of Hispania and ending (at least overtly) with its prohibition by the modern Spanish state in the mid-16th century and the expulsion of the Moriscos in the early 17th century. Although a significant proportion of Moriscos returned to Spain or avoided expulsion through various means, and the decree never affected the country's large enslaved Muslim population, the indigenous practice of Islam had faded into obscurity by the 19th century.
Document 5: Portugal: The early history of Portugal is shared with the rest of the Iberian Peninsula located in South Western Europe. The name of Portugal derives from the joined Romano-Celtic name Portus Cale. The region was settled by Pre-Celts and Celts, giving origin to peoples like the Gallaeci, Lusitanians, Celtici and Cynetes, visited by Phoenicians and Carthaginians, incorporated in the Roman Republic dominions as Lusitania and part of Gallaecia, after 45 BC until 298 AD, settled again by Suebi, Buri, and Visigoths, and conquered by Moors. Other influences include some 5th-century vestiges of Alan settlement, which were found in Alenquer (old Germanic Alankerk, from Alan+kerk; meaning church of the Alan (people), Coimbra and Lisbon.
Document 6: Moors: In 711, troops mostly formed by Moors from North Africa led the Umayyad conquest of Hispania. The Iberian peninsula then came to be known in classical Arabic as Al - Andalus, which at its peak included most of Septimania and modern - day Spain and Portugal.
Document 7: Portugal: After defeating the Visigoths in only a few months, the Umayyad Caliphate started expanding rapidly in the peninsula. Beginning in 711, the land that is now Portugal became part of the vast Umayyad Caliphate's empire of Damascus, which stretched from the Indus river in the Indian sub-continent (now Pakistan) up to the South of France, until its collapse in 750. That year the west of the empire gained its independence under Abd-ar-Rahman I with the establishment of the Emirate of Córdoba. After almost two centuries, the Emirate became the Caliphate of Córdoba in 929, until its dissolution a century later in 1031 into no less than 23 small kingdoms, called Taifa kingdoms.
Document 8: Somalis: The birth of Islam on the opposite side of Somalia's Red Sea coast meant that Somali merchants, sailors and expatriates living in the Arabian Peninsula gradually came under the influence of the new religion through their converted Arab Muslim trading partners. With the migration of fleeing Muslim families from the Islamic world to Somalia in the early centuries of Islam and the peaceful conversion of the Somali population by Somali Muslim scholars in the following centuries, the ancient city-states eventually transformed into Islamic Mogadishu, Berbera, Zeila, Barawa and Merca, which were part of the Berberi civilization. The city of Mogadishu came to be known as the City of Islam, and controlled the East African gold trade for several centuries.
Document 9: Umayyad Caliphate: The Quran and Muhammad talked about racial equality and justice as in The Farewell Sermon. Tribal and nationalistic differences were discouraged. But after Muhammad's passing, the old tribal differences between the Arabs started to resurface. Following the Roman–Persian Wars and the Byzantine–Sassanid Wars, deep rooted differences between Iraq, formally under the Persian Sassanid Empire, and Syria, formally under the Byzantine Empire, also existed. Each wanted the capital of the newly established Islamic State to be in their area. Previously, the second caliph Umar was very firm on the governors and his spies kept an eye on them. If he felt that a governor or a commander was becoming attracted to wealth, he had him removed from his position.
Document 10: History of Iran: Iranian dynastic history was interrupted by the Arab conquest of Persia in 651 AD, establishing the even larger Islamic caliphate, and later by the Mongol invasion. The main religion of ancient Persia was the native Zoroastrianism, but after the seventh century, it was replaced by Islam.
Document 11: Battle of Las Navas de Tolosa: The Battle of Las Navas de Tolosa, known in Arab history as the Battle of Al-Uqab (), took place on 16 July 1212 and was an important turning point in the "Reconquista" and in the medieval history of Spain. The Christian forces of King Alfonso VIII of Castile were joined by the armies of his rivals, Sancho VII of Navarre, Peter II of Aragon and Afonso II of Portugal, in battle against the Almohad Muslim rulers of the southern half of the Iberian Peninsula. The Caliph al-Nasir ("Miramamolín" in the Spanish chronicles) led the Almohad army, made up of people from the whole Almohad empire. Most of the men in the Almohad army came from the African side of the empire.
Document 12: Middle Ages: Religious beliefs in the Eastern Empire and Iran were in flux during the late sixth and early seventh centuries. Judaism was an active proselytising faith, and at least one Arab political leader converted to it. Christianity had active missions competing with the Persians' Zoroastrianism in seeking converts, especially among residents of the Arabian Peninsula. All these strands came together with the emergence of Islam in Arabia during the lifetime of Muhammad (d. 632). After his death, Islamic forces conquered much of the Eastern Empire and Persia, starting with Syria in 634–635 and reaching Egypt in 640–641, Persia between 637 and 642, North Africa in the later seventh century, and the Iberian Peninsula in 711. By 714, Islamic forces controlled much of the peninsula in a region they called Al-Andalus.The Islamic conquests reached their peak in the mid-eighth century. The defeat of Muslim forces at the Battle of Tours in 732 led to the reconquest of southern France by the Franks, but the main reason for the halt of Islamic growth in Europe was the overthrow of the Umayyad Caliphate and its replacement by the Abbasid Caliphate. The Abbasids moved their capital to Baghdad and were more concerned with the Middle East than Europe, losing control of sections of the Muslim lands. Umayyad descendants took over the Iberian Peninsula, the Aghlabids controlled North Africa, and the Tulunids became rulers of Egypt. By the middle of the 8th century, new trading patterns were emerging in the Mediterranean; trade between the Franks and the Arabs replaced the old Roman economy. Franks traded timber, furs, swords and slaves in return for silks and other fabrics, spices, and precious metals from the Arabs.
Document 13: Middle Ages: Religious beliefs in the Eastern Empire and Persia were in flux during the late 6th and early 7th centuries. Judaism was an active proselytising faith, and at least one Arab political leader converted to it.[J] Christianity had active missions competing with the Persians' Zoroastrianism in seeking converts, especially among residents of the Arabian Peninsula. All these strands came together with the emergence of Islam in Arabia during the lifetime of Muhammad (d. 632). After his death, Islamic forces conquered much of the Eastern Empire and Persia, starting with Syria in 634–635 and reaching Egypt in 640–641, Persia between 637 and 642, North Africa in the later 7th century, and the Iberian Peninsula in 711. By 714, Islamic forces controlled much of the peninsula in a region they called Al-Andalus.
Document 14: History of India: Several Islamic kingdoms (sultanates) under both foreign and, newly converted, Rajput rulers were established across the north western subcontinent (Afghanistan and Pakistan) over a period of a few centuries. From the 10th century, Sindh was ruled by the Rajput Soomra dynasty, and later, in the mid-13th century by the Rajput Samma dynasty. Additionally, Muslim trading communities flourished throughout coastal south India, particularly on the western coast where Muslim traders arrived in small numbers, mainly from the Arabian peninsula. This marked the introduction of a third Abrahamic Middle Eastern religion, following Judaism and Christianity, often in puritanical form. Mahmud of Ghazni in the early 11th century raided mainly the north-western parts of the Indian sub-continent 17 times, but he did not seek to establish "permanent dominion" in those areas.
Document 15: Middle Ages: Depopulation, deurbanisation, invasion, and movement of peoples, which had begun in Late Antiquity, continued in the Early Middle Ages. The barbarian invaders, including various Germanic peoples, formed new kingdoms in what remained of the Western Roman Empire. In the 7th century, North Africa and the Middle East—once part of the Eastern Roman Empire—came under the rule of the Caliphate, an Islamic empire, after conquest by Muhammad's successors. Although there were substantial changes in society and political structures, the break with Antiquity was not complete. The still-sizeable Byzantine Empire survived in the east and remained a major power. The empire's law code, the Code of Justinian, was rediscovered in Northern Italy in 1070 and became widely admired later in the Middle Ages. In the West, most kingdoms incorporated the few extant Roman institutions. Monasteries were founded as campaigns to Christianise pagan Europe continued. The Franks, under the Carolingian dynasty, briefly established the Carolingian Empire during the later 8th and early 9th century. It covered much of Western Europe, but later succumbed to the pressures of internal civil wars combined with external invasions—Vikings from the north, Magyars from the east, and Saracens from the south.
ground_truth: 7th
sub_queries: where did the moors who invaded spain come from Answer: North Africa
In what century did Muslims conquer North Africa ? Answer: 7th