Spain occupies 85% of the Iberian Peninsula, which it shares with Portugal, in southwest Europe. Africa is less than 10 mi (16 km) south at the Strait of Gibraltar. A broad central plateau slopes to the south and east, crossed by a series of mountain ranges and river valleys. Principal rivers are the Ebro in the northeast, the Tajo in the central region, and the Guadalquivir in the south. Off Spain's east coast in the Mediterranean are the Balearic Islands (1,936 sq mi; 5,014 sq km), the largest of which is Majorca. Sixty mi (97 km) west of Africa are the Canary Islands (2,808 sq mi; 7,273 sq km).
Spain, originally inhabited by Celts, Iberians, and Basques, became a part of the Roman Empire in 206 B.C. , when it was conquered by Scipio Africanus. In A.D. 412, the barbarian Visigothic leader Ataulf crossed the Pyrenees and ruled Spain, first in the name of the Roman emperor and then independently. In 711, the Muslims under Tariq entered Spain from Africa and within a few years completed the subjugation of the country. In 732, the Franks, led by Charles Martel, defeated the Muslims near Poitiers, thus preventing the further expansion of Islam in southern Europe. Internal dissension of Spanish Islam invited a steady Christian conquest from the north.
Aragon and Castile were the most important Spanish states from the 12th to the 15th century, consolidated by the marriage of Ferdinand II and Isabella I in 1469. In 1478, they established the Inquisition, to root out heresy and uncover Jews and Muslims who had not sincerely converted to Christianity. Torquemada, the most notorious of the grand inquisitors, epitomized the Inquisition's harshness and cruelty. The last Muslim stronghold, Granada, was captured in 1492. Roman Catholicism was established as the official state religion and most Jews (1492) and Muslims (1502) were expelled. In the era of exploration, discovery, and colonization, Spain amassed tremendous wealth and a vast colonial empire through the conquest of Mexico by Cortés (1519–1521) and Peru by Pizarro (1532–1533). The Spanish Hapsburg monarchy became for a time the most powerful in the world. In 1588, Philip II sent his invincible Armada to invade England, but its destruction cost Spain its supremacy on the seas and paved the way for England's colonization of America. Spain then sank rapidly to the status of a second-rate power under the rule of weak Hapsburg kings, and it never again played a major role in European politics. The War of the Spanish Succession (1701–1714) resulted in Spain's loss of Belgium, Luxembourg, Milan, Sardinia, and Naples. Its colonial empire in the Americas and the Philippines vanished in wars and revolutions during the 18th and 19th centuries.
In World War I, Spain maintained a position of neutrality. In 1923, Gen. Miguel Primo de Rivera became dictator. In 1930, King Alfonso XIII revoked the dictatorship, but a strong antimonarchist and republican movement led to his leaving Spain in 1931. The new constitution declared Spain a workers' republic, broke up the large estates, separated church and state, and secularized the schools. The elections held in 1936 returned a strong Popular Front majority, with Manuel Azaña as president.