The Spanish Empire in the Americas was formed after conquering large stretches of land, beginning with Christopher Columbus in the Caribbean Islands. It comprised territories and colonies of the Spanish monarch in the Americas and the Philippines, with some territory in North Africa and Oceania. In the early 16th century, it conquered and incorporated both the Aztec Empire and Inca Empire, retaining indigenous elites loyal to the Spanish crown and converts to Christianity as intermediaries between their communities and royal government. After a short period of delegation of authority by the crown in the Americas, the crown asserted control over those territories and established the Council of the Indies to oversee rule there. The structure of governance of its overseas empire was significantly reformed in the late 18th century by the Bourbon monarchs. Although the crown attempted to keep its empire a closed economic system under Hapsburg rule, Spain was unable to supply the Indies with sufficient consumer goods to meet demand, so that foreign merchants from Genoa, France, England, Germany, and The Netherlands dominated the trade, with silver from the mines of Peru and Mexico flowing to other parts of Europe. The merchant guild of Seville (later Cadiz) served as middlemen in the trade. The crown's trade monopoly was broken early in the seventeenth century, with the crown colluding with the merchant guild for fiscal reasons in circumventing the supposedly closed system. Spain was unable to defend the territories it claimed in the Americas, with the Dutch, the English, and the French taking Caribbean islands, using them to engage in contraband trade with the Spanish populace in the Indies. In the seventeenth century, the diversion of silver revenue to pay for European consumer goods and the rising costs of defense of its empire meant that "tangible benefits of America to Spain were dwindling...at a moment when the costs of empire were climbing sharply." The Bourbon monarchy attempted to expand the possibilities for trade within the empire, by allowing commerce between all ports in the empire, and took other measures to revive economic activity to the benefit of Spain. The Bourbons had inherited "an empire invaded by rivals, an economy shorn of manufactures, a crown deprived of revenue... taxing colonists, tightening control, and fighting off foreigners. In the process, they gained a revenue and lost an empire." The Napoleonic invasion of the Iberian peninsula precipitated the Spanish American wars of independence (1808-1826), resulting the loss of its most valuable colonies. In its former colonies in the Americas, Spanish is the dominant language and Catholicism the main religion, enduring cultural legacies of the Spanish Empire.
With the marriage of the heirs apparent to their respective thrones Ferdinand of Aragon and Isabella of Castile created a personal union that most scholars view as the foundation of the Spanish monarchy. Their dynastic alliance was important for a number of reasons, ruling jointly over a large aggregation of territories although not in a unitary fashion. They successfully pursued expansion in Iberia in the Christian Reconquest of the Muslim Kingdom of Granada, completed in 1492, for which Valencia-born Pope Alexander VI gave them the title of the Catholic Monarchs. Ferdinand of Aragon was particularly concerned with expansion in France and Italy, as well as conquests in North Africa.
With the Ottoman Turks controlling the choke points of the overland trade from Asia and the Middle East, both Spain and Portugal sought alternative routes. The Kingdom of Portugal had an advantage over the rest of Iberian, having earlier retaken territory from the Muslims. Portugal completed Christian reconquest in 1238 and settling the kingdom's boundaries. Portugal then began to seek further overseas expansion, first to the port of Ceuta (1415) and then by colonizing the Atlantic islands of Madeira (1418) and the Azores (1427-1452); it also began voyages down the west coast of Africa in the fifteenth century. Its rival Castile laid claim to the Canary Islands (1402) and retook territory from the Moors in 1462. The Christian rivals, Castile and Portugal, came to formal agreements over the division of new territories in the Treaty of Alcaçovas (1479), as well as securing the crown of Castile for Isabella, whose accession was challenged militarily by Portugal.
Following the voyage of Christopher Columbus in 1492 and first major settlement in the New World in 1493, Portugal and Castile divided the world by the Treaty of Tordesillas (1494), which gave Portugal Africa and Asia and the Western Hemisphere to Spain. The voyage of Christopher Columbus, a Genoese mariner married to a Portuguese woman in Lisbon, obtained the support of Isabella of Castile, sailing west in 1492, seeking a route to the Indies. Columbus unexpectedly encountered the western hemisphere, populated by peoples he named "Indians." Subsequent voyages and full-scale settlements of Spaniards followed, with gold beginning to flow into Castile's coffers. Managing the expanding empire became an administrative issue. The reign of Ferdinand and Isabella began the professionalization of the apparatus of government in Spain, which led to a demand for men of letters (letrados) who were university graduates (licenciados), of Salamanca, Valladolid, Complutense and Alcalá. These lawyer-bureaucrats staffed the various councils of state, eventually including the Council of the Indies and Casa de Contratación, the two highest bodies in metropolitan Spain for the government of the empire in the New World, as well as royal government in The Indies.
With the Christian reconquest completed in the Iberian peninsula, Spain began trying to take territory in Muslim North Africa. It had conquered Melilla in 1497, and further expansionism policy in North Africa was developed during the regency of Ferdinand the Catholic in Castile, stimulated by the Cardinal Cisneros. Several towns and outposts in the North African coast were conquered and occupied by Castile: Mazalquivir (1505), Peñón de Vélez de la Gomera (1508), Oran (1509), Algiers (1510), Bougie and Tripoli (1510). Tripoli was taken on 24–25 July, the feast of St. James, protector of Spain; the claim was made that 10,000 Muslims were killed and many captured. On the Atlantic coast, Spain took possession of the outpost of Santa Cruz de la Mar Pequeña (1476) with support from the Canary Islands, and it was retained until 1525 with the consent of the treaty of Cintra (1509). The Spanish conquest of Oran (1509) was won with much bloodshed: a third of its Muslim population—4,000 inhabitants— were massacred, and up to 8,000 were taken prisoner. The Zeiyanid sultans of Tlemcen quickly submitted to Spanish protectorate, and the two powers soon became allies. Cardinal Cisneros converted two mosques to Catholic use, and restored and expanded the town's fortifications. Oran, like other principal Algerian ports, was forced to accept a presidio (military outpost); it became a major naval base, a garrison city armed with traffic-commanding cannons and harquebuses. For about 200 years, Oran's inhabitants were virtually held captive in their fortress walls, ravaged by famine and plague; soldiers, too, were irregularly fed and paid. In 1792, Spain abandoned Oran, selling it to the Ottoman Empire.