Instruct: Given a question, retrieve relevant documents that can help answer the question.
Query: When did the Moors first invade Spain?
The Spanish Inquisition (Inquisición Española) can be interpreted as a response to the multi-religious nature of Spanish society following the reconquest of the Iberian Peninsula from the Muslim Moors. After invading in 711, large areas of the Iberian Peninsula were ruled by Muslims until 1250, when they were restricted to Granada, which fell in 1492. However, the Reconquista did not result in the total expulsion of Muslims from Spain, since they, along with Jews, were tolerated by the ruling Christian elite. Large cities, especially Seville, Valladolid and Barcelona, had significant Jewish populations centered in Juderia, but in the coming years the Muslims were increasingly subjugated by alienation and torture.
The threat of internal stability remained until the marriage of Queen Isabella I of Castile and King Ferdinand II of Aragon in 1469. The two monarchs were promptly challenged by Joan of Castile but were swiftly successful. Isabella would go on to establish the "Hermandad" militia system, which would provide her with a royal counterbalance to any future challenge from the nobility. The two monarchs proceeded to conquer the Kingdom of Granada, the last Islamic state in the Iberian peninsula, which was completed by 1492. In that same year, the Alhambra Decree was issued, expelling all Jews from both Castile and Aragon. Now unified, Spain now enjoyed relative internal stability; rights and lands across the Mediterranean; and a strong tradition of seafaring in both the Atlantic and Mediterranean, which it would maximise in the coming decades.
Portuguese operations in Asia did not go unnoticed, and in 1521 Magellan arrived in the region and claimed the Philippines for Spain. In 1525, Spain under Charles V sent an expedition to colonize the Moluccas islands, claiming they were in his zone of the Treaty of Tordesillas, since there was no set limit to the east. The expedition of García Jofre de Loaísa reached the Moluccas, docking at Tidore. With the Portuguese already established in nearby Ternate, conflict was inevitable, leading to nearly a decade of skirmishes. A resolution was reached with the Treaty of Zaragoza in 1529, attributing the Moluccas to Portugal and the Philippines to Spain.
Notable reefs that are part of the archipelago are as follows:The Comoros have been inhabited since the 6th century; among the peoples who crossed the sea to populate the islands are the Bantu, Malagasy, and Indonesian, Arabs, Portuguese, French, and Indians. Islam arrived during the 10th century. The Comoros islands formed, with Zanzibar, Pemba, Lamu, and the coastal towns of Kenya and Tanzania, a united and prosperous region of Swahili culture, featuring the ivory trade and commerce in local goods exported to the Middle East and India. In that period, political power was in the hands of local rulers. During their explorations of the Comoros region, the Portuguese made landfall on the Islands of the Moon, in 1505; the Arabic "gamar" is the English "moon".
Indian Moors were a grouping of people who existed in Sri Lanka predominantly during its colonial period. They were distinguished by their Muslim faith whose origins traced back to the British Raj. Therefore, Indian Moors refer to a number of ethnic groups such as Memons, Bohra and Khoja. These groups tended to retain their own ancestral practices and language. However the largest specific group were Tamils from South India. Indian Moors shared a similar history to Indian Tamils of Sri Lanka, however due to their decline and smaller numbers the Indian Moors have either returned to India or have declared themselves as being classified as Sri Lankan Moors.
Spain came into existence as a single, united kingdom under Charles I of Spain on 23 January 1516. The monarchy was briefly abolished by the First Spanish Republic from 11 February 1873 until 29 December 1874. The monarchy was abolished again on 14 April 1931, first by the Second Spanish Republic – which lasted until 1 April 1939 – and subsequently by the dictatorship of Francisco Franco, who ruled until his death on 20 November 1975. Monarchy was restored on 22 November 1975 under Juan Carlos I, who was also the monarch until his abdication in 2014. His son Felipe VI is the current monarch. 
The 1978 constitution confirms the title of the monarch is the "King of Spain", but that he may also use other titles historically associated with the Crown,
including the kingdoms of Castile and León, Aragon, the Two Sicilies, Jerusalem, Navarre, Granada, Seville, Toledo, Valencia, Galicia, Sardinia, Córdoba, Corsica, etc.
An early opportunity for Spain to enter China presented itself when the Chinese pirate Limahong attacked Manila in 1574. As Limahong was wanted by the Chinese authorities, officials in Fujian province were willing to let the Spanish establish a trade port on an island south of Xiamen in return for Limahong's capture. However, the governor of the Philippines at the time did not respond favourably, and the offer came to nothing when Limahong escaped from Manila. In the 1590s, the need for a Spanish base in China gained new urgency as Japan, ruled by the militant regent Toyotomi Hideyoshi, invaded Korea and threatened to conquer Ryukyu, China, Taiwan, and the Spanish Philippines. The "San Felipe" incident of 1596 and the subsequent execution of Franciscan friars in Nagasaki all but confirmed Japan's hostile intentions in Spanish eyes, and even the death of Hideyoshi in 1598 did not alleviate these fears. Thus, in 1598, governor Francisco de Tello de Guzmán sent Juan de Zamudio to the coast of China not only to establish trade, but also to warn Chinese authorities of possible Japanese aggression in its southern coast.
Spanish is also spoken in the integral territories of Spain in North Africa, which include the Spanish cities of Ceuta and Melilla, the Plazas de soberanía, and the Canary Islands archipelago (population 2,000,000), located some off the northwest coast of mainland Africa. In northern Morocco, a former Spanish protectorate that is also geographically close to Spain, approximately 20,000 people speak Spanish as a second language, while Arabic is the "de jure" official language. A small number of Moroccan Jews also speak the Sephardic Spanish dialect Haketia (related to the Ladino dialect spoken in Israel). Spanish is spoken by some small communities in Angola because of the Cuban influence from the Cold War and in South Sudan among South Sudanese natives that relocated to Cuba during the Sudanese wars and returned in time for their country's independence.
Spain's world empire reached its greatest territorial extent in the late 18th century but it was under the Habsburg dynasty in the 16th and 17th centuries it reached the peak of its power and declined. The Iberian Union with Portugal meant that the monarch of Castile was also the monarch of Portugal, but they were ruled as separate entities both on the peninsula and in Spanish America and Brazil. In 1640, the House of Braganza revolted against Spanish rule and reasserted Portugal's independence.
In 1492, the arrival of Christopher Columbus on a Castilian-paid expedition paved the way for the Spanish colonization of the Americas. As a result of this process, most countries in South America now speak the same language as Castile. Until about the eighteenth century, the Kingdom of Castile, and not Spain as a whole, was the colonizing power, and the language used was called "castellano". Thus, some Latin American countries formerly under Spanish rule have retained the custom of calling it "castellano", while others eventually switched to calling it "español", with many different factors influencing the final choice.
The centre of Spanish military power shifted dramatically in the early 18th century. The War of the Spanish Succession (1701–1714) was both a civil and international war in which the French backed the Bourbon contender for the Spanish throne and an alliance led by Austria, the Netherlands and Britain backed the Habsburg contender while a divided Spain fought on both sides. The war secured the Spanish throne for the Bourbon Philip as Philip V of Spain at the Peace of Utrecht but in the war's settlement, Spain had to give up the Spanish Netherlands, Naples, Milan, Sardinia, Sicily, Gibraltar and Menorca to the Habsburg allies. Spain's defeat by the combined alliance of France, Britain, the Netherlands and Austria in the War of the Quadruple Alliance (1718–1720) confirmed the decline from her former dominance, whilst the successful deployment of the Britain's Royal Navy into the Mediterranean, by exploiting the fortress of Gibraltar, gained in 1704 by an Anglo-Dutch force during the war of succession, would create considerable difficulties in the following years.
There is evidence of a limited cultural borrowing from the Mozarabs by the Muslim community in Al-Andalus. For instance, the Muslims' adoption of the Christian solar calendar and holidays was an exclusively Andalusi phenomenon. In Al-Andalus, the Islamic lunar calendar was supplemented by the local solar calendar, which were more useful for agricultural and navigational purposes. Like the local Mozarabs, the Muslims of Al-Andalus were notoriously heavy drinkers. Muslims also celebrated traditional Christian holidays sometimes with the sponsorship of their leaders, despite the fact that such fraternisation was generally opposed by the Ulema. The Muslims also hedged their metaphysical bets through the use of Roman Catholic sacraments.
The May Revolution was a direct reaction to Spain's Peninsular War. In 1808, King Ferdinand VII of Spain abdicated in favor of Napoleon, who granted the throne to his brother, Joseph Bonaparte. A Supreme Central Junta led resistance to Joseph's government and the French occupation of Spain, but eventually suffered a series of reversals that resulted in the Spanish loss of the northern half of the country. On February 1, 1810, French troops took Seville and gained control of most of Andalusia. The Supreme Junta retreated to Cadiz and dissolved itself, and the Council of Regency of Spain and the Indies replaced it. News of these events arrived in Buenos Aires on May 18, brought by British ships.
In the War of the First Coalition, Spain declared war on the newly formed French Republic, joined the Coalition in attempting to restore the Bourbon Monarchy. The main Spanish general was Antonio Ricardos, who failed to secure a decisive victory, despite initial successes. French forces elsewhere quickly overran the Austrian Netherlands after the Battle of Fleurus, and the Dutch Republic collapsed under huge pressure. The Spanish were having similarly bad times. The Spanish navy did little, with the exception of combining with the British and participating in the Siege of Toulon.
Expansion continued during the first half of the reign of Suleiman I (r. 1520-1566), who conquered first Belgrade (1521) and Rhodes, before invading Hungary in 1526, defeating and killing King Louis II in the Battle of Mohács and briefly occupying Buda. Lacking a king, Hungary descended into civil war over the succession, and the Ottomans gave support to John Zápolya as a vassal prince. When their rivals the Habsburgs began to achieve the upper hand, Suleiman directly intervened by again conquering Buda and annexing it to the empire in 1541. Elsewhere, Suleiman led major campaigns against Safavid Iran, conquering Baghdad in 1534 and annexing Iraq. Ottoman rule was further extended with the incorporation of much of North Africa, the conquest of coastal Yemen in 1538, and the subsequent annexation of the interior.
The history of the Philippines from 1521 to 1898, also known as the Spanish colonial period, was a period during which Spain controlled the Philippine islands as the Captaincy General of the Philippines, initially under New Spain until Mexican independence in 1821, which gave Madrid direct control over the area. It was also known as Spanish East Indies to the colonialists. It started with the arrival in 1521 of European explorer Ferdinand Magellan sailing for Spain, which heralded the period when the Philippines was a colony of the Spanish Empire, and ended with the outbreak of the Philippine Revolution in 1898, which marked the beginning of the American colonial era of Philippine history.
As a part of the intense immigration process which Spain in general and Catalonia in particular have experienced over the last decade, there is a large number of immigrant languages spoken in various cultural communities in Catalonia, of which (Maghrebi) Arabic and Urdu are the most common if Spanish-speaking migrants are not taken into account.
The Mongol conquest of China was a series of major military efforts by the Mongol Empire to invade China proper. It spanned six decades in the 13th century and involved the defeat of the Jin dynasty, Western Xia, the Dali Kingdom and the Southern Song. The Mongol Empire under Genghis Khan started the conquest with small-scale raids into Western Xia in 1205 and 1207. By 1279, the Mongol leader Kublai Khan had established the Yuan dynasty in China and crushed the last Song resistance, which marked the onset of all of China under the Mongol Yuan rule. This was the first time in history that the whole of China was conquered and subsequently ruled by a foreign or non-native ruler.
In 1206, Genghis Khan established a powerful dynasty among the Mongols of central Asia. During the 13th century, this Mongol Empire conquered most of the Eurasian land mass, including China in the east and much of the old Islamic caliphate (as well as Kievan Rus') in the west. The destruction of Baghdad and the House of Wisdom by Hulagu Khan in 1258 has been seen by some as the end of the Islamic Golden Age.
During the Umayyad dynasty, the Iberian Peninsula was an integral province of the Umayyad Caliphate ruling from Damascus. The Umayyads lost the position of Caliph in Damascus in 750, and Abd al-Rahman I became Emir of Córdoba in 756 after six years in exile. Intent on regaining power, he defeated the existing Islamic rulers of the area who defied Umayyad rule and united various local fiefdoms into an emirate.
The 19th century was a turbulent time for Spain. Those in favour of reforming Spain's government vied for political power with conservatives, who tried to prevent reforms from taking place. Some liberals, in a tradition that had started with the Spanish Constitution of 1812, sought to limit the power of the monarchy of Spain and to establish a liberal state. The reforms of 1812 did not last after King Ferdinand VII dissolved the Constitution and ended the Trienio Liberal government. Twelve successful coups were carried out between 1814 and 1874. Until the 1850s, the economy of Spain was primarily based on agriculture. There was little development of a bourgeois industrial or commercial class. The land-based oligarchy remained powerful; a small number of people held large estates called "latifundia" as well as all the important government positions.
Unhappy with this change of policy of the Portuguese government, Napoleon sent an army to invade Portugal. On 17 October 1807, 24,000 French troops under General Junot crossed the Pyrenees with Spanish cooperation and headed towards Portugal to enforce Napoleon's Continental System. This was the first step in what would become the six-year-long Peninsular War, a struggle that sapped much of the French Empire's strength. Throughout the winter of 1808, French agents became increasingly involved in Spanish internal affairs, attempting to incite discord between members of the Spanish royal family. On 16 February 1808, secret French machinations finally materialised when Napoleon announced that he would intervene to mediate between the rival political factions in the Spanish royal family. Marshal Murat led 120,000 troops into Spain and the French arrived in Madrid on 24 March, where wild riots against the occupation erupted a few weeks later. The resistance to French aggression soon spread throughout the country. The shocking French defeat at the Battle of Bailén in July gave hope to Napoleon's enemies and partly persuaded the French emperor to intervene in person. A new French army commanded by Napoleon crossed the Ebro in autumn and dealt blow after blow to the opposing Spanish forces. Napoleon entered Madrid on 4 December with 80,000 troops. He then unleashed his troops against Moore's British forces. The British were swiftly driven to the coast, and, after a last stand at the Battle of Corunna in January 1809, withdrew from Spain entirely.
In 718 AD, a Visigothic noble named Pelagius was elected leader by many of the ousted Visigoth nobles. Pelagius called for the remnant of the Christian Visigothic armies to rebel against the Moors and re-group in the unconquered northern Asturian highlands, better known today as the Cantabrian Mountains, a small mountain region in modern northwestern Spain adjacent to the Bay of Biscay. He planned to use the Cantabrian Mountain range as a place of refuge and protection from the invaders and as a springboard to reconquer lands from the Moors. After defeating the Moors in the Battle of Covadonga in 722 AD, Pelagius was proclaimed king to found the Christian Kingdom of Asturias and start the war of reconquest known in Portuguese (and Spanish) as the "Reconquista".
Following the decline of the Roman Empire, Spain was invaded by various barbaric tribes-including the Suebi and the Visigoths. Little is known about progress of viticulture and winemaking during this period but there is evidence that some viable form of wine industry was present when the Moors conquered the land during the early 8th century AD. While the Moors were Muslim and subjected to Islamic dietary laws that forbid the use of alcohol, the Moorish rulers held an ambiguous stance on wine and winemaking during their rule. Several caliphs and emirs owned vineyards and drank wine. While there were laws written that outlawed the sale of wine, it was included on lists of items that were subject to taxation in Moorish territories. The Spanish "Reconquista" reopened the possibility of exporting Spanish wine. Bilbao emerged as a large trading port; introducing Spanish wines to the English wine markets in Bristol, London and Southampton. The quality of some of these exported Spanish wines appears to have been high. In 1364, the court of Edward III established the maximum price of wine sold in England with the Spanish wines being priced at the same level as wines from Gascony and higher than those from La Rochelle. The full bodied and high alcohol in most Spanish wines made them favoured blending partners for the "weaker" wines from the cooler climate regions of France and Germany though there were laws that explicitly outlawed this practice.
The north of Iberia (the former Kingdom of Gallaecia) was never put under real control and were not the most ideal place for the Moors, who just sent a military forces to collect taxes. But by the late 710’s Al-Andalus suffered of revolts. The Berbers did not like the lands they were given and were repressed by the emiral forces in several battles until the rebellion stopped, but then the Berbers turned against the Astures, claiming higher taxes and setting punishment patrols against their villages. This forced the Astures to start a guerrilla war. During the Moorish invasion of Spain, the Moors briefly occupied Galicia until they were driven out in 739 by Alfonso I of Asturias. The kingdom was known as Kingdom of Asturias until 924, when it became the Kingdom of León. Moors regained southern part of Galicia in 953 and were finally driven out in 1034.