Spanish Empire

The Spanish Empire (Imperio Español; Imperium Hispanicum), historically known as the Hispanic Monarchy (Monarquía Hispánica) and as the Catholic Monarchy (Monarquía Católica), was one of the s in history. From the late 15th century to the early 19th, Spain controlled a huge overseas territory in the, the n archipelago of the , what they called "The Indies" (Las Indias) and territories in , and. The Spanish Empire has been described as the first in history, a description also given to the. It was one of the empires described as the most powerful of the 16th and 17th centuries. The Spanish Empire became known as "" and reached its maximum extension in the 18th century.

became the dominant kingdom in Iberia because of its jurisdiction over the overseas empire in the Americas and the Philippines. The structure of empire was established under the (1516–1700), and under the  monarchs the empire was brought under greater crown control and increased its revenues from the Indies. The crown's authority in The Indies was enlarged by the papal grant of, giving it power in the religious sphere. An important element in the formation of Spain's empire was the between  and, known as the , which initiated political, religious and social cohesion but not political unification. kingdoms retained their political identities, with particular administration and juridical configurations.

Although the power of the Spanish sovereign as monarch varied from one territory to another, the monarch acted as such in a unitary manner over all the ruler's territories through a : the unity did not mean uniformity. In 1580, when succeeded to the throne of Portugal (as Philip I), he established the, which oversaw Portugal and its empire and "preserv[ed] its own laws, institutions, and monetary system, and united only in sharing a common sovereign." The remained in place until in 1640, when Portugal reestablished the independence under the.

Under Philip II (1556–98), Spain, rather than the Habsburg empire, was identified as the most powerful nation in the world, easily eclipsing France and England. Furthermore, despite attacks from, Spain retained its position of dominance with apparent ease. Philip II ruled over the greatest s (Spain, Portugal, and the ),, Franche-Comté in France, the Rhineland in Germany, an uninterrupted tract of the Americas from the viceroyalty of New Spain bordering modern-day Canada all the way down to , trading ports throughout and South Asia, the , and select holdings in Guinea and North Africa. He also had a claim on England by marriage.

The Spanish empire in the Americas was formed after conquering indigenous empires and, beginning with in the. In the early 16th century, it conquered and incorporated the and  empires, 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 to oversee rule there. The crown then established viceroyalties in the two main areas of settlement, and, both regions of dense indigenous populations and mineral wealth. The Spanish — the first circumnavigation of the Earth — laid the foundation for the Pacific oceanic empire of Spain and began the.

The structure of governance of its overseas empire was significantly in the late 18th century by the Bourbon monarchs. 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. 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... [and tried to reverse the situation by] taxing colonists, tightening control, and fighting off foreigners. In the process, they gained a revenue and lost an empire." The precipitated the  (1808–1826), resulting in 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.

Catholic Monarchs and origins of empire
With the marriage of the heirs apparent to their respective thrones and  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 of the Muslim, completed in 1492. This conquest is often called the “Christian Reconquest” due to the different religions of the ruling class of both kingdoms. Since the Kingdom of Granada was the last moorish kingdom in the peninsula, Valencia-born Pope gave them the title of the. However, it is important to realize that the Kingdom of Granada and its surrounding kingdoms had been part of Muslim caliphates for over seven centuries. The term “reconquest” perpetrates a false idea that the peninsula somehow belonged to Catholics. In reality, even though religion may have played a part in the conquest, the fact of the matter was that southern expansion was partially motivated by traditional reasons as well, such as wealth and land. However, due to the prioritization of the religious aspect, the term “Christian reconquest” is still used to describe the event. 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 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 (1415) and then by colonizing the Atlantic islands of  (1418) and the  (1427-1452); it also began voyages down the west coast of Africa in the fifteenth century. Its rival Castile laid claim to the (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 (1479), as well as securing the crown of Castile for Isabella, whose accession was challenged militarily by Portugal.

Following the voyage of in 1492 and first major settlement in the  in 1493, Portugal and Castile divided the world by the  (1494), which gave Portugal Africa and Asia and the Western Hemisphere to Spain. The voyage of, a 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, , and. These lawyer-bureaucrats staffed the various councils of state, eventually including the and, 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.

Conquest and subsequent colonization of Andalusia
When King Ferdinand and Queen Isabella conquered the Iberian peninsula, they had to implement policies to maintain control of the newly gained territory. To do so, the monarchy implemented a system of encomienda. This iteration of the encomienda system was land based, with tributary and land rights given to different noble families. This eventually led to a large land based aristocracy, a separate ruling class that the crown later tried to eliminate in its overseas colonies. By implementing this method of political organization, the crown was able to implement new forms of private property without completely replacing already existing systems, such as the communal use of resources. After the military and political conquest, there was an emphasis on religious conquest as well, leading to the creation of the Spanish Inquisition. Although the Inquisition was technically a part of the Catholic church, the Ferdinand and Isabella formed a separate Spanish Inquisition, which led to mass expulsion of Muslims and Jews from the peninsula. This religious court system was later adopted and transported to the Americas, though they took a less effective role there due to limited jurisdiction and large territories.

Campaigns in North Africa
With the Christian reconquest completed in the Iberian peninsula, Spain began trying to take territory in Muslim North Africa. It had conquered in 1497, and further expansionism policy in North Africa was developed during the regency of Ferdinand the Catholic in Castile, stimulated by the. Several towns and outposts in the North African coast were conquered and occupied by Castile: (1505),  (1508),  (1509),  (1510),  and  (1510). On the Atlantic coast, Spain took possession of the outpost of (1476) with support from the, and it was retained until 1525 with the consent of the treaty of Cintra (1509).

Navarre and Struggles for Italy
The Catholic Monarchs had developed a strategy of marriages for their children in order to isolate their long-time enemy: France. The Spanish princesses married the heirs of Portugal, England and the. Following the same strategy, the Catholic Monarchs decided to support the Aragonese house of against  in the  beginning in 1494. As, Ferdinand had been involved in the struggle against France and for control of Italy; these conflicts became the center of Ferdinand's foreign policy as king. In these battles, which established the supremacy of the in European battlefields, the forces of the kings of Spain acquired a reputation for invincibility that would last until the mid-17th century.

After the death of Queen Isabella in 1504, and her exclusion of Ferdinand from a further role in Castile, Ferdinand married in 1505, cementing an alliance with France. Had that couple had a surviving heir, likely the would have been split from Castile, which was inherited by Charles, Ferdinand and Isabella's grandson. Ferdinand adopted a more aggressive policy toward Italy, attempting to enlarge Spain's sphere of influence there. Ferdinand's first deployment of Spanish forces came in the against, where the Spanish soldiers distinguished themselves on the field alongside their French allies at the  (1509). Only a year later, Ferdinand became part of the against France, seeing a chance at taking both  — to which he held a dynastic claim – and. This war was less of a success than the war against Venice, and in 1516, France agreed to a truce that left Milan in its control and recognized Spanish control of, which had effectively been a Spanish protectorate following a series of treaties in 1488, 1491, 1493, and 1495.

Canary Islands
Portugal obtained several s that acknowledged Portuguese control over the discovered territories, but Castile also obtained from the Pope the safeguard of its rights to the with the bulls Romani Pontifex dated 6 November 1436 and Dominatur Dominus dated 30 April 1437. The, inhabited by people, began in 1402 during the reign of , by  nobleman  under a feudal agreement with the crown. The conquest was completed with the campaigns of the armies of the between 1478 and 1496, when the islands of  (1478–1483), La Palma (1492–1493), and  (1494–1496) were subjugated.

Rivalry with Portugal
The Portuguese tried in vain to keep secret their discovery of the Gold Coast (1471) in the, but the news quickly caused a huge gold rush. Chronicler wrote that the fame of the treasures of Guinea "spread around the ports of  in such way that everybody tried to go there". Worthless trinkets, Moorish textiles, and above all, shells from the and  islands were exchanged for gold, slaves, ivory and Guinea pepper.

The (1475–79) provided the Catholic Monarchs with the opportunity not only to attack the main source of the Portuguese power, but also to take possession of this lucrative commerce. The Crown officially organized this trade with Guinea: every caravel had to secure a government license and to pay a tax on one-fifth of their profits (a receiver of the customs of Guinea was established in in 1475 – the ancestor of the future and famous ).

Castilian fleets fought in the, temporarily occupying the islands (1476), conquering the city of  in  in 1476 (but retaken by the Portuguese), and even attacked the  islands, being defeated at. The turning point of the war came in 1478, however, when a Castilian fleet sent by King Ferdinand to conquer lost men and ships to the Portuguese who expelled the attack, and a large Castilian armada—full of gold—was entirely captured in the decisive.

The (4 September 1479), while assuring the Castilian throne to the Catholic Monarchs, reflected the Castilian naval and colonial defeat: "War with Castile broke out waged savagely in the Gulf [of Guinea] until the Castilian fleet of thirty-five sail was defeated there in 1478. As a result of this naval victory, at the Treaty of Alcáçovas in 1479 Castile, while retaining her rights in the, recognized the Portuguese monopoly of fishing and navigation along the whole west African coast and Portugal's rights over the ,  and  islands [plus the right to conquer the  ]." The treaty delimited the of the two countries, establishing the principle of the. It was confirmed in 1481 by the, in the papal bull (dated on 21 June 1481).

However, this experience would prove to be profitable for future Spanish overseas expansion, because as the Spaniards were excluded from the lands discovered or to be discovered from the Canaries southward — and consequently from the around Africa — they sponsored the voyage of Columbus towards the west (1492) in search of  to trade in its, encountering  instead. Thus, the limitations imposed by the Alcáçovas treaty were overcome and a new and more balanced division of the world would be reached in the between both emerging maritime powers.

New World Voyages and the Treaty of Tordesillas
Seven months before the treaty of Alcaçovas, King died, and his son, married to the , inherited the thrones of the. The two became known as the, with their marriage a that created a relationship between the Crown of Aragon and Castile, each with their own administrations, but ruled jointly by the two monarchs.

Ferdinand and Isabella defeated the last Muslim king out of Granada in 1492 after a. The Catholic Monarchs then negotiated with, a sailor attempting to reach  (Japan) by sailing west. Castile was already engaged in a with Portugal to reach the Far East by sea when Columbus made his bold proposal to Isabella. In the, dated on 17 April 1492, Christopher Columbus obtained from the Catholic Monarchs his appointment as viceroy and governor in the lands already discovered and that he might discover thenceforth; thereby, it was the first document to establish an administrative organization in the Indies. Columbus' discoveries inaugurated the. Spain's claim to these lands was solidified by the ' dated 4 May 1493, and ' on 26 September 1493, which vested the sovereignty of the territories discovered and to be discovered.

Since the Portuguese wanted to keep the line of demarcation of Alcaçovas running east and west along a latitude south of, a compromise was worked out and incorporated in the , dated on 7 June 1494, in which the globe was split into two hemispheres dividing Spanish and Portuguese claims. These actions gave Spain exclusive rights to establish colonies in all of the New World from north to south (later with the exception of, which Portuguese commander encountered in 1500), as well as the easternmost parts of Asia. The treaty of Tordesillas was confirmed by in the bull Ea quae pro bono pacis on 24 January 1506. Spain's expansion and colonization was driven by economic influences, for national prestige, and a desire to spread Catholicism to the New World.

The treaty of Tordesillas and the treaty of Cintra (18 September 1509) established the limits of the Kingdom of Fez for Portugal, and the Castilian expansion was allowed outside these limits, beginning with the in 1497.

Other European powers did not see the treaty between Spain and Portugal as binding on themselves. observed "The sun shines for me as for others and I should very much like to see the clause in Adam's will that excludes me from a share of the world."

Papal Bulls and the Americas
Unlike the crown of Portugal, Spain had not sought papal authorization for its explorations, but with Christopher Columbus's voyage in 1492, the crown sought papal confirmation of their title to the new lands. Since the defense of Catholicism and propagation of the faith was the papacy's primary responsibility, there were a number of papal bulls promulgated that affected the powers of the crowns of Spain and Portugal in the religious sphere. Converting the inhabitants of in the newly discovered lands was entrusted by the papacy to the rulers of Portugal and Spain, through a series of papal actions. The, or power of royal patronage for ecclesiastical positions had precedents in Iberia during the. In 1493, from the Iberian , issued a series of bulls. The papal bull of vested the government and jurisdiction of newly found lands in the kings of Castile and León and their successors. Eximiae devotionis sinceritas granted the Catholic monarchs and their successors the same rights that the papacy had granted Portugal, in particular the right of presentation of candidates for ecclesiastical positions in the newly discovered territories.

According to the Concord of Segovia of 1475, Ferdinand was mentioned in the bulls as king of Castile, and upon his death the title of the Indies was to be incorporated into the Crown of Castile. The territories were incorporated by the Catholic Monarchs as jointly held assets.

In the of 1506, Ferdinand renounced not only the government of Castile in favor of his son-in-law  but also the lordship of the Indies, withholding a half of the income of the kingdoms of the Indies. and Philip immediately added to their titles the kingdoms of Indies, Islands and Mainland of the Ocean Sea. But the Treaty of Villafáfila did not hold for long because of the death of Philip; Ferdinand returned as regent of Castile and as "lord the Indies".

According to the domain granted by Papal bulls and the wills of queen Isabella of Castile in 1504 and king Ferdinand of Aragon in 1516, such property became held by the Crown of Castile. This arrangement was ratified by successive monarchs, beginning with Charles I in 1519 in a decree that spelled out the juridical status of the new overseas territories.

The lordship of the discovered territories conveyed by papal bulls was private to the kings of Castile and León. The political condition of the Indies were to transform from "Lordship" of the Catholic Monarchs to "Kingdoms" for the heirs of Castile. Although the Alexandrine Bulls gave full, free and omnipotent power to the Catholic Monarchs, they did not rule them as a private property but as a public property through the public bodies and authorities from Castile, and when those territories were incorporated into the Crown of Castile the royal power was subject to the laws of Castile.

The crown was the guardian of levies for the support of the Catholic Church, in particular the tithe, which was levied on the products of agriculture and ranching. In general, Indians were exempt from the tithe. Although the crown received these revenues, they were to be used for the direct support of the ecclesiastical hierarchy and pious establishments, so that the crown itself did not benefit financially from this income. The crown's obligation to support the Church sometimes resulted in funds from the royal treasury being transferred to the Church when the tithes fell short of paying ecclesiastical expenses.

In, the Franciscan Bishop of Mexico and the first viceroy Don  established an institution in 1536 to train natives for ordination to the priesthood, the. The experiment was deemed a failure, with the natives considered too new in the faith to be ordained. did issue a bull, (1537), declaring that natives were capable of becoming Christians, but Mexican (1555) and Peruvian (1567–68) provincial councils banned natives from ordination.

First settlements in the Americas
With the, the granted expansive power to , including exploration, settlement, political power, and revenues, with sovereignty reserved to the Crown. The first voyage established sovereignty for the crown, and the crown acted on the assumption that Columbus's grandiose assessment of what he found was true, so Spain negotiated the with Portugal to protect their territory on the Spanish side of the line. The crown fairly quickly reassessed its relationship with Columbus and moved to assert more direct crown control over the territory and extinguish his privileges. With that lesson learned, the crown was far more prudent in the specifying the terms of exploration, conquest, and settlement in new areas.

The pattern in the Caribbean that played out over the larger Spanish Indies was exploration of an unknown area and claim of sovereignty for the crown; conquest of indigenous peoples or assumption of control without direct violence; settlement by Spaniards who were awarded the labour of indigenous people via the ; and the existing settlements becoming the launch point for further exploration, conquest, and settlement, followed by the establishment institutions with officials appointed by the crown. The patterns set in the Caribbean were replicated throughout the expanding Spanish sphere, so although the importance of the Caribbean quickly faded after the and the, many of those participating in those conquests had started their exploits in the Caribbean.

The first permanent European settlements in the New World were established in the Caribbean, initially on the island of, later Cuba and Puerto Rico. As a Genoese with the connections to Portugal, Columbus considered settlement to be on the pattern of trading forts and factories, with salaried employees to trade with locals and to identify exploitable resources. However, Spanish settlement in the New World was based on a pattern of a large, permanent settlements with the entire complex of institutions and material life to replicate Castilian life in a different venue. Columbus's second voyage in 1493 had a large contingent of settlers and goods to accomplish that. On Hispaniola, the city of was founded in 1496 by Christopher Columbus's brother  and became a stone-built, permanent city.

Assertion of Crown control in the Americas
Although Columbus staunchly asserted and believed that the lands he encountered were in Asia, the paucity of material wealth and the relative lack of complexity of indigenous society meant that the initially was not concerned with the extensive powers granted Columbus. As the Caribbean became a draw for Spanish settlement and as Columbus and his extended Genoese family failed to be recognized as officials worthy of the titles they held, there was unrest among Spanish settlers. The crown began to curtail the expansive powers that they had granted Columbus, first by appointment of royal governors and then a high court or in 1511.

Columbus encountered the mainland in 1498, and the Catholic Monarchs learned of his discovery in May 1499. Taking advantage of a revolt against Columbus in, they appointed as governor of the Indies with civil and criminal jurisdiction over the lands discovered by Columbus. Bobadilla, however, was soon replaced by Frey in September 1501. Henceforth, the Crown would authorize to individuals voyages to discover territories in the Indies only with previous royal license, and after 1503 the monopoly of the Crown was assured by the establishment of  (House of Trade) at Seville. The successors of Columbus, however, litigated against the Crown until 1536 for the fulfillment of the Capitulations of Santa Fe in the .

In Spain, the direction of the Americas was taken over by the Bishop  between 1493 and 1516, and again between 1518 and 1524, after a brief period of rule by. After 1504 the figure of the secretary was added, so between 1504 and 1507 Gaspar de Gricio took charge, between 1508 and 1518 followed him, and from 1519,.

In 1511, the of The Indies was constituted as a standing committee belonging to the  to address issues of the Indies, and this junta constituted the origin of the, established in 1524. That same year, the crown established a permanent high court, or , in the most important city at the time, Santo Domingo, on the island of (now Haiti and the Dominican Republic). Now oversight of the Indies was based both in Castile and with officials of the new royal court in the colony. As new areas were conquered and significant Spanish settlements were established, likewise other audiencias were established.

Following the settlement of Hispaniola, Europeans began searching elsewhere to begin new settlements, since there was little apparent wealth and the numbers of indigenous were declining. Those from the less prosperous Hispaniola were eager to search for new success in a new settlement. From there conquered  (1508) and  took.

In 1508, the Board of Navigators met in Burgos and concurred on the need to establish settlements on the mainland, a project entrusted to and  as governors. They were subordinated to the governor of Hispaniola, the newly appointed, with the same legal authority as Ovando.

The first settlement on the mainland was in  (now, ,  and ), settled by  in 1510. In 1513, Balboa crossed the, and led the first European expedition to see the Pacific Ocean from the West coast of the New World. In an action with enduring historical import, Balboa claimed the Pacific Ocean and all the lands adjoining it for the Spanish Crown.

The judgment of Seville of May 1511 recognized the viceregal title to Diego Columbus, but limited it to Hispaniola and to the islands discovered by his father, Christopher Columbus; his power was nevertheless limited by royal officers and magistrates constituting a dual regime of government. The crown separated the territories of the mainland, designated as, from the viceroy of Hispaniola, establishing as General Lieutenant in 1513 with functions similar to those of a viceroy, while Balboa remained but was subordinated as governor of Panama and  on the Pacific Coast; after his death, they returned to Castilla de Oro. The territory of Castilla de Oro did not include (which was comprised approximately between the  and ), as it was subject to a lawsuit between the Crown and Diego Columbus, or the region farther north, towards the Yucatán peninsula, explored by  and  in 1508–1509, due to its remoteness. The conflicts of the viceroy Columbus with the royal officers and with the , created in Santo Domingo in 1511, caused his return to the in 1515.

The Spanish Habsburgs 1516-1700
As a result of the marriage politics of the (in Spanish, Reyes Católicos), their  grandson  inherited the Castilian empire in America and the  in the Mediterranean (including all of ). Charles was also Holy Roman Emperor via his paternal line and, at his abdication, his son inherited also  and the, turning these territories into a  in Western Europe. Philip centralized the administration of the Spanish empire in, initiating a cultural and political golden age for Spain (known in Spanish as the ) while becoming known as the "Prudent King", and inherited also the in 1580.

The Habsburgs pursued several goals:
 * Undermining the power of France and containing it in its eastern borders
 * Defending Europe against, notably the in the
 * Maintaining  in the  and defending the  against the
 * Spreading (Catholic) Christianity to the unconverted indigenous of the and the
 * Exploiting the resources of the Americas (gold, silver, sugar) and trading with Asia (, spices, silk)
 * Excluding other European powers from the possessions it claimed in the

Spain came across an imperial reality without finding profits at the beginning. It did stimulate some trade and industry, but the trading opportunities encountered were limited. Therefore, Spain started to invest in America with the creation of cities, because Spain was in America due to religious reasons. Matters began to change in the 1520s with the large-scale extraction of silver from the rich deposits of Mexico's region, but it was the opening of the silver mines in Mexico's  and  in Upper Peru (modern-day Bolivia) in 1546 that became legendary. During the 16th century, Spain held the equivalent of US$1.5 trillion (1990 terms) in gold and silver received from. These imports contributed to in Spain and Europe from the last decades of the 16th century. The vast imports of silver also made local manufactures uncompetitive and ultimately made Spain overly dependent on foreign sources of s and. "I learnt a proverb here", said a French traveler in 1603: "Everything is dear in Spain except silver". The problems caused by inflation were discussed by scholars at the and the s. The natural resource abundance provoked a decline in entrepreneurship as profits from resource extraction are less risky. The wealthy preferred to invest their fortunes in (juros). The Habsburg dynasty spent the Castilian and American riches in wars across Europe on behalf of Habsburg interests, and declared moratoriums (bankruptcies) on their debt payments several times. These burdens led to a number of revolts across the Spanish Habsburg's domains, including their Spanish kingdoms, but the rebellions were put down.

Charles I of Spain/Charles V, Holy Roman Emperor (r. 1516-1558)
With the death of Ferdinand II of Aragon, and the supposed incompetence to rule of his daughter, Queen Juana of Castile and Aragon, Charles of Ghent became Charles I of Castile and Aragon. He was the first Habsburg monarch of Spain and co-ruler of Spain with his mother. Charles had been raised in northern Europe and his interests remained those of Christian Europe. The continuing threat of the Ottoman Turks in the Mediterranean and Central Europe also occupied the monarch. While not directly an inheritance, Charles was elected emperor of the after the death of his grandfather  thanks to prodigious bribes paid to the prince-electors. Charles became the most powerful Christian ruler in Europe, but his Ottoman rival,, challenged Charles for primacy in Europe. France made an unprecedented but pragmatic alliance with the Muslim Ottomans against Habsburg political power and the Ottomans assisted German Protestant princes in the religious conflicts tearing Christian unity apart in Northern Europe. Simultaneously, the overseas lands claimed by Spain in the New World proved to be a source of wealth and the crown was able to assert greater control over its overseas possessions in the political and religious spheres than was possible on Iberian peninsula or in Europe. The conquests of the and the  brought vast indigenous civilizations into the Spanish Empire and the mineral wealth, particularly silver, were identified and exploited, becoming the economic lifeblood of the crown. Under Charles, Spain and its overseas empire in the Americas became deeply entwined, with the crown enforcing Catholic exclusivity; exercising crown primacy in political rule, unencumbered by claims of an existing aristocracy; and defending its claims against other European powers. In 1558 he abdicated his throne of Spain to his son,, leaving the ongoing conflicts to his heir.

Struggles for Italy
With the ascent of in 1516 and his election as sovereign of the  in 1519,  found himself surrounded by Habsburg territories. He invaded the Imperial possessions in Italy in 1521, inaugurating the of the. The war was a disaster for France, which suffered defeat in the (1522), the  (1525), in which Francis I was captured and imprisoned in Madrid, and in the  (1529) before Francis relented and abandoned  to the Empire. Charles later gave the imperial fief of Milan to his Spanish son Philip.

The papacy and Charles had complicated relations. Charles's forces were victorious at the in 1525. switched sides and joined forces with France and prominent Italian states against the Habsburg Emperor, resulting in the. Charles grew exhausted with the pope's meddling in what he viewed as purely secular affairs. In 1527, Charles's army in northern Italy, underpaid and desiring to plunder the city of Rome, mutinied, advanced southward toward Rome, and looted the city. The, while unintended by Charles, embarrassed the papacy sufficiently enough that Clement, and succeeding popes, were considerably more circumspect in their dealings with secular authorities. In 1533, Clement's refusal to annul the first marriage of King to Charles's aunt,, may have been partly or entirely motivated by his unwillingness to offend the emperor and perhaps have his city sacked for a second time. The, signed between Charles V and the Pope in 1529, established a more cordial relationship between the two leaders. Charles was effectively named the protector of the Catholic cause, and he was crowned as  by the Medici  in return for  in overthrowing the rebellious  Republic.

The crowns of Castile and Aragon depended on Genoese bankers for its finances and the Genoese fleet aided the Spanish in fighting the Ottomans in the Mediterranean.

Ottoman Turks during Charles V's rule
By the 16th century, the had become a threat to the states of Western Europe. They had defeated the eastern Christian Byzantine empire and seized its capital, creating it as the Ottoman capital and the Ottomans controlled a rich area of the eastern Mediterranean, with links to Asia, Egypt, and India and in by the mid-sixteenth century, they ruled a third of Europe. The Ottomans had created an impressive land and maritime empire, with port cities and short and long range trade connections. Charles's great rival was, whose rule almost exactly coincided with Charles's. A contemporary Spanish writer, , compared Charles unfavorably with Suleiman in the 1540s, saying that although both were wealthy and pursued war, "the Turks succeeded better at fulfilling their projects than did the Spanish; they devoted themselves more fully to the order and discipline of war, they were better advised, they used their money more effectively."

In 1535, Charles assembled an invasion force of 60,000 troops and 398 ships from the Habsburg domains, Genoa, Portugal, the Papal States, and the Knights of St. John, and he had this force invade in North Africa, from which the Ottomans and their corsairs launched several raids against the Christian states of the Mediterranean. The Habsburgs destroyed the Ottoman fleet in the harbor before besieging the fortress of La Goletta. After the Habsburg forces conquered the city of Tunis, they massacred 30,000 Muslim civilians.

assembled a league consisting of the, the , the Spanish Empire, Portugal, the , the , and the , but this coalition was defeated at the 1538 , and it soon disbanded.

In 1543, Francis I of France announced his unprecedented alliance with the Islamic sultan of the, , by occupying the Spanish-controlled in concert with Ottoman Turk forces. Henry VIII of England, who bore a greater grudge against France than he held against Charles for standing in the way of his divorce, joined him in his invasion of France. Although the Spanish were defeated at the in Savoy, the French army was unable to seriously threaten Spanish-controlled Milan, while suffering defeat in the north at the hands of Henry, thereby being forced to accept unfavorable terms. The Austrians, led by Charles's younger brother, continued to fight the Ottomans in the east.

The presence of Spain in North Africa declined during Charles's reign, though and its port,, were taken in 1535. One after another, most of the Spanish possessions were lost: Peñón de Vélez de la Gomera (1522), Santa Cruz de Mar Pequeña (1524), Algiers (1529), Tripoli (1551), Bujia (1554), and La Goleta and Tunis (1569).

Religious conflicts in the Holy Roman Empire
The had allied itself to the French, and efforts in Germany to undermine the League had been rebuffed. Francis's defeat in 1544 led to the annulment of the alliance with the Protestants, and Charles took advantage of the opportunity. He first tried the path of negotiation at the in 1545, but the Protestant leadership, feeling betrayed by the stance taken by the Catholics at the council, went to war, led by the.

In response, Charles invaded Germany at the head of a mixed Dutch–Spanish army, hoping to restore the Imperial authority. The emperor personally inflicted a decisive defeat on the Protestants at the historic in 1547. In 1555, Charles signed the with the Protestant states and restored stability in Germany on his principle of , a position unpopular with Spanish and Italian clergymen. Charles's involvement in Germany would establish a role for Spain as protector of the Catholic, cause in the ; the precedent would lead, seven decades later, to involvement in the war that would decisively end Spain as Europe's leading power.

The Indies
When Charles succeeded to the throne of Spain, Spain's overseas possessions in the New World were based in the Caribbean and the Spanish Main and consisted of a rapidly decreasing indigenous population, few resources of value to the crown, and a sparse Spanish settler population. The situation changed dramatically with the expedition of, who, with alliances with hostile to the  and thousands of indigenous Mexican warriors,  the Aztec Empire (1519-1521). Following the pattern established in Spain during the Christian of Islamic Spain, and in the Caribbean, the first European settlements in the Americas, conquerors divided up the indigenous population in private holdings s and exploited their labor. Central Mexico and later the Inca Empire of Peru gave Spain vast new indigenous populations to convert to Christianity and rule as vassals of the crown. Charles established the in 1524 to oversee all of Castile's overseas possessions. Charles appointed a in 1535, capping the royal governance of the high court, , and treasury officials with the highest royal official. Following the conquest of Peru, in 1542 Charles likewise appointed a. Both officials were under the jurisdiction of the Council of the Indies. Charles promulgated the of 1542 to limit the power of the conqueror group to form a hereditary aristocracy that might challenge the power of the crown.

Philip II (r. 1556-1598)
The reign of was extremely important, with both major successes and failures. Philip was Charles V's only legitimate son. He did not become Holy Roman Emperor, but divided Habsburg possessions with his uncle. Philip treated Castile as the foundation of his empire, but the population of Castile was never great enough to provide the soldiers needed to defend the Empire or settlers to populate it. When he married, England was allied to Spain. He seized the throne of Portugal in 1580, creating the and bringing the entire Iberian peninsula under his personal rule.

According to one of his biographers, it was entirely due to Philip that the Indies were brought under crown control, remaining Spanish until the wars of independence in the early nineteenth century and Catholic to the present era. His greatest failure was his inability to suppress the Dutch revolt, which was aided by English and French rivals. His militant Catholicism also played a major role in his actions, as did his inability to understand imperial finances. He inherited his father's debts and incurred his own pursuing religious wars, resulting in recurring state bankruptcies and dependence on foreign bankers. Although there was an enormous expansion of silver production in Peru and Mexico, it did not remain in the Indies or even in Spain itself, but rather much of it went to European merchant houses. Under Philip's rule, learned men, known as s began writing analyses of this paradox of Spain's impoverishment.

Ottoman Turks, the Mediterranean, and North Africa during Philip II's rule
The first years of his reign, "from 1558 to 1566, Philip II was concerned principally with Muslim allies of the Turks, based in Tripoli and Algiers, the bases from which North African [Muslim] forces under the corsair preyed upon Christian shipping." In 1565, the Spanish defeated an on the strategic island of, defended by the. The death of the following year and his succession by his less capable son  emboldened Philip, who resolved to carry the war to the sultan himself. In 1571, Spanish and s, joined by volunteers from across Europe led by Charles's natural son, annihilated the Ottoman fleet at the. The battle ended the threat of Ottoman naval hegemony in the Mediterranean. Following the battle, Philip and the Ottomans concluded truce agreements. The victory was aided by the participation of various military leaders and contingents from parts of Italy under Philip's rule. German soldiers took part in the capture of Peñón del Vélez in North Africa in 1564. By 1575, German soldiers were three-quarters of Philip's troops.

The Ottomans recovered soon. They reconquered Tunis in 1574, and they helped to restore an ally,, to the throne of Morocco, in 1576. The death of the Persian shah,, was an opportunity for the Ottoman sultan to intervene in that country, so he agreed to a truce in the Mediterranean with Philip II in 1580. Nonetheless, the Spanish at Lepanto eliminated the best sailors of the Ottoman fleet, and the Ottoman Empire would never recover in quality what they could in numbers. Lepanto was the decisive turning point in control of the Mediterranean away from centuries of Turkish hegemony. In the western Mediterranean, Philip pursued a defensive policy with the construction of a series of armed garrisons and peace agreements with some of the Muslim rulers of North Africa.

In the first half of the 17th century, Spanish ships attacked the Anatolian coast, defeating larger Ottoman fleets at the and the. and, on the Moroccan Atlantic coast, and the island of , in the Mediterranean, were taken, but during the second half of the 17th century, Larache and La Mamora were also lost.

Conflicts in North-West Europe
When Philip succeeded his father, Spain was not at peace, since came to the throne in 1547 and immediately renewed conflict with Spain. Philip aggressively prosecuted the war against France, crushing a French army at the in Picardy in 1558 and defeating Henry again at the. The, signed in 1559, permanently recognized Spanish claims in Italy. In the celebrations that followed the treaty, Henry was killed by a stray splinter from a lance. France was stricken for the next thirty years by chronic civil war and unrest (see ) and, during this period, removed it from effectively competing with Spain and the Habsburg family in European power games. Freed from effective French opposition, Spain attained the of its might and territorial reach in the period 1559–1643.

The time for rejoicing in Madrid was short-lived. In 1566, -led riots in the Netherlands prompted the to march into the country to restore order. In 1568,, better known as William the Silent, led a failed attempt to drive Alba from the Netherlands. These battles are generally considered to signal the start of the that ended with the independence of the  in 1648. The Spanish, who derived a great deal of wealth from the Netherlands and particularly from the vital port of, were committed to restoring order and maintaining their hold on the provinces. According to, "It is estimated that the port of Antwerp was earning the Spanish crown seven times more revenues than the ."

For Spain, the war became an endless quagmire, sometimes literally. In 1574, the Spanish army under was repulsed from the  after the Dutch broke the, thus causing extensive flooding. Alba's son,, committed shocking massacres at Zutphen, , and Haarlem. In 1576, faced with the bills from his 80,000-man army of occupation in the Netherlands, the cost of his fleet that had won at Lepanto, together with the growing threat of in the open seas reducing his income from his American colonies, Philip was forced to accept bankruptcy. The army in the Netherlands mutinied not long after, and looting the southern Netherlands. This "" was used by William to reinforce his arguments to ally all the Netherlands' Provinces with him. The was formed only to be dissolved later out of intolerance towards the religious diversity of its members. Calvinists began their wave of uncontrolled atrocities aimed at the Catholics. This divisiveness gave Spain the opportunity to send with 20,000 well-trained troops into the Netherlands. Groningen, Breda, Campen, Antwerp, and Brussels, among others, were put to siege. In January, 1579, a group of Catholic nobles formed a League for the protection of their religion and property. Later that same month Friesland, Gelderland, Groningen, Holland, Overijssel, Utrecht and Zeeland formed the which became the Dutch  of today. The remaining provinces became the and in the 19th century became. Farnese soon regained nearly all the Southern provinces for Spain.

Further north, the city of was besieged on March 12, 1579. Farnese's attackers tunneled an extensive network of passages in order to enter the city beneath its walled defenses. The defenders dug tunnels to meet them. Battles were fought fiercely in caverns with limited maneuvering capabilities. Hundreds of besiegers were scalded or choked to death when boiling water was poured into the tunnels or fires were lit to fill them with smoke. In an attempt to mine the city, 500 of Farnese's own men were killed when the explosives detonated prematurely. It took more than four months but the besiegers finally breached the wall and entered the city at night. Catching the exhausted defenders sleeping, they massacred 6,000 men, women and children. Of the city's 30,000 population, only 400 survived. Maastricht was a major disaster for the Protestant cause and the Dutch began to turn on William of Orange. After several unsuccessful attempts, William was assassinated in 1584. The Queen of England began to aid the Northern provinces and sent troops there in 1585. English forces under the Earl of Leicester and then Lord Willoughby faced the Spanish in the Netherlands under Farnese in a series of largely indecisive actions that tied down significant numbers of Spanish troops and bought time for the Dutch to reorganize their defenses. The suffered defeat at the hands of the English in 1588 and the situation in the Netherlands became increasingly difficult to manage. , William's son, recaptured, , and. The following year the English launched the, under Sir Francis Drake, but thousands were killed, wounded or died of disease and 40 ships sunk or captured. The attempt to restore the Portuguese Crown from Spain was unsuccessful and the opportunity to strike a decisive blow against the weakened Spanish navy was lost. The failure of the expedition depleted the financial resources of England's treasury, which had been carefully restored during the long reign of Elizabeth I.

Spain had invested itself in the religious warfare in France after Henry II's death. In 1589,, the last of the lineage, died at the walls of Paris. His successor,, the first king of France, was a man of great ability, winning key victories against the  at  (1589) and  (1590). Committed to stopping Henry of Navarre from becoming King of France, the Spanish divided their army in the Netherlands and invaded France, relieving in 1590 and  in 1592.

On October 25, 1590 the Spanish landed in Nantes. They established as an operational base the port of Blavet. On May 21, 1592 they defeated an Anglo-French army at the and, after chasing the English contingent, they completely derailed it in. On 6 November of that year they took. In 1593 the Spanish landed on and built "La Pointe des Espagnols" (The Tip of the Spaniards) fort in the Crozon peninsula, dominating the entrance to the Brest port. On October 1, an Anglo-French army started a, while an English fleet bombarded the place from the sea. The garrison could only hold out until November 15, while the auxiliary army, led by, failed to relieve the fort having been blocked at. On the 19th an assault by the besiegers put the garrison to the sword — there were only 13 survivors.

The Spanish decided to organize a punitive expedition against England for helping the French. Thus, on July 26, 1595, three companies of musketeers under the command of Captain sailed in four galleys. They first made landfall in to get supplies. On July 31 they left for England and landed on August 2 in,. In two days the sacked and burned  (where only a pub survived),, Paul and. They also cleared the heavy artillery of the English and then re-embarked on the galleys. On 5 August, a day after setting sail back to France, they found a Dutch squadron of 46 ships from which they managed to escape but not before sinking two enemy ships. On August 10, Amésquita and his men landed victoriously in. The expedition resulted in 20 casualties, all of them in the skirmish against the Dutch.

In early June 1595, the Spanish, , crossed the Alps with an army of 12,000 troops from Italy and Sicily. The Catholic French noble joined forces with him at Besançon, and the combined Spanish-Catholic League army moved on with the goal of capturing Dijon. King Henry managed to gather 3,000 French troops, and he raced to Troyes to prevent the Spanish from doing so. At the on 5 June 1595, the French surprised the Spanish and forced them to retreat temporarily, and Velasco decided to retreat, thinking that the numerically-inferior French were waiting for reinforcements. The French royal victory there marked the end of the Catholic League.

The French also made some progress during an invasion of the Spanish Netherlands, led by and. The French captured and massacred the small Spanish garrison, provoking anger among the Spanish ranks. The Spanish launched a concerted offensive that year, taking, Cambrai, and ; at Doullens, the Spanish shouted "Remember Ham" and massacred everyone in the city (military and civilians alike) in an act of revenge. The Spanish general in charge of the offensive,, proceeded to launch an invasion of France in 1596. From 8 to 24 April 1596, Coloma's 15,000-strong Spanish army, held by 7,000 French troops under. Relief forces from England and the United Provinces failed to lift the siege, and Calais fell to Spain. The won a resounding victory, and the Spanish—now in control of both Calais and Dunkirk—had control over the.

In March 1597, the Spanish succeeded in capturing the city of Amiens through a ruse. King Henry IV immediately and quickly built up an army of 12,000 infantry and 3,000 cavalry (including 4,200 English troops) and on 13 May,  facing 29,000 infantry and 3,000 cavalry (5,500 in Amiens, 25,000 in relief). The relief force, commanded by Archduke Albert of Austria and Ernst von Mansfeld, repeatedly failed to dislodge the French besiegers, and it was forced to retreat. On 25 September 1597, the entire Spanish force in Amiens was forced to surrender, and Henry was now in a strong position to negotiate peace terms.

In 1595, and  had fitful Spanish backing when they led an. In 1601, Spain landed soldiers on the coast of in support, but the groups did not rendezvous successfully. Instead, the Spanish were pinned down by the English at the, and they were decisively defeated in 1602.

Faced with wars against France, England and the United Provinces, each led by capable leaders, the bankrupted Spanish empire found itself competing against strong adversaries. Continuing piracy against its shipping in the Atlantic and costly colonial enterprises forced Spain to renegotiate its debts in 1596. Philip had been forced to declare bankruptcy in 1557, 1560, 1575, and 1598. The crown attempted to reduce its exposure to the conflicts, first signing the with France in 1598, recognizing  (since 1593 a Catholic) as king of France, and restoring many of the stipulations of the previous.

The Indies
Under Philip II, royal power over The Indies increased, but the crown knew little about its overseas possessions in the Indies. Although the Council of the Indies was tasked with oversight there, it acted without advice of high officials with direct colonial experience. Another serious problem was that the crown did not know what Spanish laws were in force there. To remedy the situation, Philip appointed Juan de Ovando, who was named President of the council, to give advice. Ovando appointed a "chronicler and cosmographer of the Indies,", to gather information about the crown's holdings, which resulted in the in the 1580s.

The crown sought greater control over encomenderos, who had attempted to establish themselves as a local aristocracy; strengthened the power of the ecclesiastical hierarchy; shored up religious orthodoxy by the establishment of the Inquisition in Lima and Mexico City (1571); and increased revenues from silver mines in Peru and in Mexico, discovered in the 1540s. Particularly important was the crown's appointment of two able viceroys, Don as viceroy of Peru (r. 1569-1581), and in Mexico,  (r. 1568-1580), who was subsequently appointed viceroy to replace Toledo in Peru. In Peru, after decades of political unrest, with ineffective viceroys and encomenderos wielding undue power, weak royal institutions, a renegade Inca state existing in, and waning revenue from the silver mine of Potosí, Toledo's appointment was a major step forward for royal control. He built on reforms attempted under earlier viceroys, but he is often credited with a major transformation in crown rule in Peru. Toledo formalized the labor draft of Andean commoners, the, to guarantee a labor supply for both the silver mine at and the mercury mine at. He established administrative districts of , and resettled native Andeans in to better rule them. Under Toledo, the last stronghold of the Inca state was destroyed and the last Inca emperor,, was executed. Silver from Potosí flowed to coffers in Spain and paid for Spain's wars in Europe. In Mexico, Viceroy Enríquez organized the defense of the northern frontier against nomadic and bellicose indigenous groups, who attacked the transport lines of silver from the northern mines. In the religious sphere, the crown sought to bring the power of the religious orders under control with the Ordenanza del Patronazgo, ordering friars to give up their Indian parishes and turn them over to the diocesan clergy, who were more closely controlled by the crown.

The crown expanded its global claims and defended existing ones in the Indies. Transpacific explorations had resulted in Spain claiming the Philippines and the establishment of Spanish settlements and trade with Mexico. The viceroyalty of Mexico was given jurisdiction over the Philippines, which became the entrepôt for Asian trade. Philip's succession to the crown of Portugal in 1580 complicated the situation on the ground in the Indies between Spanish and Portuguese settlers, although Brazil and Spanish America were administered through separate councils in Spain. Spain dealt with English encroachment on Spain's maritime control in the Indies, particularly by Sir and his cousin. Drake narrowly escaped with his life when Hawkins' ships were trapped between Spanish galleons and shore batteries at (in present-day Mexico). In January 1586, with, Drake led a party ashore to sack in Hispaniola, and he looted  several weeks later. The Spanish defeated the fleet of Drake and Hawkins in 1595 in and Cartagena de Indias (Colombia). Spain regained control in the Isthmus of Panama by relocating the main port there from to.

The Philippines, the Sultanate of Brunei and Southeast Asia
With the conquest and settlement of the Philippines, the Spanish Empire reached its greatest extent. In 1564, was commissioned by the  (Mexico), Don, to lead an expedition in the Pacific Ocean to find the , where earlier explorers  and  had landed in 1521 and 1543, respectively. The westward sailing to reach the sources of spices continued to be a necessity with the Ottomans still controlled major choke points in central Asia. It was unclear how the agreement between Spain and Portugal dividing the Atlantic world affected finds on the other side of the Pacific. Spain had ceded its rights to the "Spice Islands" to Portugal in the in 1529, but the appellation was vague as was their exact delineation. The Legazpi expedition was ordered by King Philip II, after whom the had earlier been named by Ruy López de Villalobos, when Philip was heir to the throne. The king stated that "the main purpose of this expediiton is to establish the return route from the western isles, since it is already known that the route to them is fairly short." The viceroy died in July 1564, but the and López de Legazpi completed the preparations for the expedition. On embarking on the expedition, Spain lacked maps or information to guide the king's decision to authorize the expedition. That realization subsequently led to the creation of reports from the various regions of the empire, the. The Philippines came under the jurisdiction of the viceroyalty of Mexico, and once the sailings between Manila and Acapulco were established, Mexico became the Philippines' link to the larger Spanish Empire.

Spanish colonization began in earnest when López de Legazpi arrived from Mexico in 1565 and formed the first settlements in. Beginning with just five ships and five hundred men accompanied by Augustinian friars, and further strengthened in 1567 by two hundred soldiers, he was able to repel the Portuguese and create the foundations for the colonization of the archipelago. In 1571, the Spanish, their Mexican recruits and their Filipino (Visayan) allies attacked and occupied, a vassal-state of the , and negotiated the incorporation of the which was liberated from the Bruneian Sultanate's control and of whom, their princess, Gandarapa, had a tragic romance with the Mexican-born Conquistador and grandson of Miguel Lopez de Legazpi,. The combined Spanish-Mexican-Filipino forces also built a Christian walled city over the burnt ruins of Muslim Maynila and made it as the new capital of the and renamed it. Spaniards were few and life was difficult and they were often outnumbered by their Latino recruits and Filipino allies. They attempted to mobilize subordinated populations through the. Unlike in the Caribbean where the indigenous populations rapidly disappeared, the indigenous populations continued to be robust in the Philippines. One Spaniard described the climate as "cuarto meses de polvo, cuartro meses de lodo, y cuartro meses de todo" (four months of dust, four months of mud, and four months of everything).

Legazpi built a fort in Manila and made overtures of friendship to, Lakan of Tondo, who accepted. Maynila's former ruler, the Muslim rajah,, who was a vassal to the Sultan of Brunei, refused to submit to Legazpi but failed to get the support of Lakan Dula or of the Pampangan and Pangasinan settlements to the north. When and a force of Kapampangan and Tagalog Muslim warriors attacked the Spaniards in the, he was finally defeated and killed. The Spanish also repelled an attack by Chinese pirate warlord. Simultaneously, the establishment of a Christianized Philippines attracted Chinese traders who exchanged their silk for Mexican silver, Indian and Malay traders also settled in the Philippines too, to trade their spices and gems for the same Mexican silver. The Philippines then became a center for Christian missionary activity that was also directed to Japan and the Philippines even accepted Christian converts from Japan after the Shogun persecuted them. Most of the soldiers and settlers sent by the Spanish to the Philippines were either from Mexico or Peru and very little people directly came from Spain.

In 1578, the erupted between the Christian Spaniards and Muslim Bruneians over control of the Philippine archipelago. The Spanish were joined by the newly Christianized Non-Muslim Visayans of the who were Animists and  who were Hindus, plus the  (who were from northern Mindanao and were Hindus with a Buddhist Monarchy), as well as the remnants of the Kedatuan of Dapitan who are also Animists and had previously waged war against the Islamic nations of the  and. They fought against the and its allies, the Bruneian puppet-states of Maynila and Sulu, which had dynastic links with Brunei. The Spanish, its Mexican recruits and Filipino allies assaulted Brunei and seized its capital,. This was achieved partly as a result of the assistance of two, Pengiran Seri Lela and Pengiran Seri Ratna. The former had traveled to Manila to offer Brunei as a of Spain for help to recover the throne usurped by his brother, Saiful Rijal. The Spanish agreed that if they succeeded in conquering Brunei, Pengiran Seri Lela would indeed become the Sultan, while Pengiran Seri Ratna would be the new. In March 1578, the Spanish fleet, led by De Sande himself, acting as, started its journey towards Brunei. The expedition consisted of 400 Spaniards and Mexicans, 1,500 natives and 300 Borneans. The campaign was one of many, which also included action in and.

The Spanish succeeded in invading the capital on April 16, 1578, with the help of Pengiran Seri Lela and Pengiran Seri Ratna. Sultan Saiful Rijal and Paduka Seri Begawan Sultan Abdul Kahar were forced to flee to Meragang then to. In Jerudong, they made plans to chase the conquering army away from Brunei. The Spanish suffered heavy losses due to a or  outbreak. They were so weakened by the illness that they decided to abandon Brunei to return to Manila on June 26, 1578, after just 72 days. Before doing so, they burned the mosque, a high structure with a five-tier roof.

Pengiran Seri Lela died in August–September 1578, probably from the same illness that had afflicted his Spanish allies, although there was suspicion he could have been poisoned by the ruling Sultan. Seri Lela's daughter, the Bruneian princess, left with the Spanish and went on to marry a Christian, named Agustín de Legazpi of Tondo, and had children in the Philippines.

In 1587,, one of the children of Lakan Dula, along with Lakan Dula's nephew and lords of the neighboring areas of Tondo, Pandacan, Marikina, Candaba, Navotas and Bulacan, were executed when the failed; a planned grand alliance with the Japanese Christian-captain, Gayo, and Brunei's Sultan, would have restored the old aristocracy. Its failure resulted in the hanging of Agustín de Legaspi and the execution of Magat Salamat (the crown-prince of Tondo). Thereafter, some of the conspirators were exiled to Guam or Guerrero, Mexico.

The Spanish then conducted the centuries long against the Sultanates of, Lanao and Sulu. War was also waged against the and  (in response to Ternatean slaving and piracy against Spain's allies:  and ). During the Spanish-Moro conflict, the Moros of Muslim Mindanao conducted piracy and slave-raids against Christian settlements in the Philippines. The Spanish fought back by establishing Christian fort-cities such as on Muslim Mindanao. The Spanish considered their war with the Muslims in Southeast Asia an extension of the, a centuries-long campaign to retake and rechristianize the Spanish homeland which was invaded by the Muslims of the. The Spanish expeditions into the Philippines were also part of a larger Ibero-Islamic world conflict that included, which had a center of operations at its nearby vassal, the.

In 1593, the governor-general of the Philippines,, set out to conquer , igniting the. Some 120 Spaniards, Japanese, and Filipinos, sailing aboard three junks, launched an expedition to Cambodia. After an altercation between the Spanish expedition members and some Chinese merchants at the port left a few Chinese dead, the Spanish were forced to confront the newly-declared king Anacaparan, burning much of his capital while defeating him. In 1599, Malay Muslim merchants defeated and massacred almost the entire contingent of Spanish troops in Cambodia, putting an end to Spanish plans to conquer it. Another expedition, one to conquer, was also lacking in success. In 1603, during a, Pérez Dasmariñas was beheaded, and his head was mounted in Manila along with those of several other Spanish soldiers.

Portugal and the Iberian Union 1580-1640
In 1580, King Philip saw the opportunity to strengthen his position in Iberia when the last member of the, , died. Philip asserted his claim to the Portuguese throne and in June sent the Duke of Alba with an army to Lisbon to assure his succession. He established the, on the pattern of the , the , , and , that oversaw particular jurisdictions, but all under the same monarch. In Portugal, the Duke of Alba and the Spanish occupation were little more popular in than in. The combined Spanish and Portuguese empires placed into Philip's hands included almost the entirety of the explored New World along with a vast trading empire in Africa and Asia. In 1582, when Philip II moved his court back to Madrid from the Atlantic port of Lisbon, where he had temporarily settled to pacify his new Portuguese kingdom, the pattern was sealed, in spite of what every observant commentator privately noted. "Sea power is more important to the ruler of Spain than any other prince", wrote one commentator, "for it is only by sea power that a single community can be created out of so many so far apart." A writer on tactics in 1638 observed, "The might most suited to the arms of Spain is that which is placed on the seas, but this matter of state is so well known that I should not discuss it, even if I thought it opportune to do so." Portugal and her kingdoms, including Brazil and her African colonies, were under the dominion of the Spanish monarch.

Portugal required an extensive occupation force to keep it under control, and Spain was still reeling from the 1576 bankruptcy. In 1584, William the Silent was assassinated by a half-deranged Catholic, and the death of the popular Dutch resistance leader was hoped to bring an end to the war but did not. In 1585, Queen sent support to the Protestant causes in the Netherlands and France, and  launched attacks against Spanish merchants in the Caribbean and the Pacific, along with a particularly aggressive attack on the port of.

Portugal was brought into Spain's conflicts with rivals. In 1588, hoping to put a stop to Elizabeth's intervention, Philip sent the to invade England. Unfavorable weather, plus heavily armed and manœuvrable English ships, and the fact that the English had been warned by their spies in the Netherlands and were ready for the attack resulted in a defeat for the Armada. However, the failure of the to Portugal and the Azores in 1589 marked a turning point in the on-off 1585–1604. The Spanish fleets became more effective in transporting greatly increased quantities of silver and gold from the Americas, while English attacks suffered costly failures.

During the reign of Philip IV (Philip III of Portugal) in 1640, the Portuguese revolted and fought for their independence from the rest of Iberia. The Council of Portugal was subsequently dissolved.

Philip III (r. 1598-1621)
Philip II's successor,, made chief minister the capable as a , the first of the validos ('most worthy'). Philip sought to reduce foreign conflicts, since even the vast revenues could not sustain the nearly bankrupted kingdom. The, suffering from a series of repulses at sea and from by Catholics in Ireland, who were supported by Spain, agreed to the , following the accession of the more tractable  King. Philip's chief minister, the duke of Lerma, also steered Spain toward peace with the Netherlands in 1609, although the conflict was to emerge again at a later point.

provided the with most of its revenues and its best troops. The devastated Castilian lands between 1596 and 1602, causing the deaths of some 600,000 people. A great number of Castilians went to America or died in battle. In 1609, the great majority of the population of Spain (much more numerous and unassimilated in the kingdoms of  and, than in the  or the ) was expelled. It is estimated that lost about 25% of its population between 1600 and 1623. Such a dramatic drop in the population meant the basis for the Crown's revenues was dangerously weakened in a time when it was engaged in continuous conflict in Europe.

Peace with England and France gave Spain an opportunity to focus its energies on restoring its rule to the Dutch provinces. The Dutch, led by, the son of William the Silent and perhaps the greatest strategist of his time, had succeeded in taking a number of border cities since 1590, including the fortress of. However, the Genoese nobleman, commanding an army of mercenary Italian troops, fought in the name of Spain and repeatedly defeated the Dutchmen. He was prevented from conquering the Netherlands only by Spain's latest in 1607. In 1609, the was signed between Spain and the. At last, Spain was at peace – the .

Spain made a fair recovery during the truce, putting its finances in order and doing much to restore its prestige and stability in the run-up to the last truly great war in which she would play a leading part. The Duke of Lerma (and to a large extent Philip II) had been uninterested in the affairs of their ally, Austria. In 1618, the king replaced him with Don, a veteran ambassador to. Don Balthasar believed that the key to restraining the resurgent French and eliminating the Dutch was a closer alliance with. In 1618, beginning with the, Austria and the , , embarked on a campaign against the and. Don Balthasar encouraged Philip to join the Austrian Habsburgs in the war, and Spinola, the rising star of the Spanish army in the Netherlands, was sent at the head of the to intervene. Thus, Spain entered into the.

Philip IV (r. 1621-1665)
When Philip IV succeeded his father in 1621, Spain was clearly in economic and political decline, a source of consternation. The learned s sent the king more analyses of Spain's problems and possible solutions. As an illustration of the precarious economic situation of Spain at the time, it was actually Dutch bankers who financed the merchants of. At the same time, everywhere in the world Dutch entrepreneurship and settlements were undermining Spanish and Portuguese. The Dutch were religiously tolerant and not evangelical, focusing on trade, as opposed to Spain's longstanding defense of Catholicism. A Dutch proverb says, "Christ is good; trade is better!"

Spain badly needed time and peace to repair its finances and to rebuild its economy. In 1622, Don Balthasar was replaced by, a reasonably honest and able man. After certain initial setbacks, the Bohemians were defeated at in 1621, and again at  in 1623. The war with the Netherlands was renewed in 1621 with Spinola taking the fortress of in 1625. The intervention of in the war threatened the Spanish position, but the victory of the Imperial general  over the Danes at  and again at  (both in 1626), eliminated that threat.

There was hope in Madrid that the Netherlands might finally be reincorporated into the Empire, and after the defeat of Denmark the Protestants in Germany seemed crushed. France was once again involved in its own instabilities (the began in 1627), and Spain's eminence seemed clear. The Count-Duke Olivares asserted, "God is Spanish and fights for our nation these days".

Olivares realized that Spain needed to reform, and to reform it needed peace, first and foremost with the Dutch United Provinces. Olivares aimed for "peace with honor", however, which meant in practice a peace settlement that would have restored to Spain something of its predominant position in the Netherlands. This was unacceptable to the United Provinces, and the inevitable consequence was the constant hope that one more victory would finally lead to "peace with honor", perpetuating the ruinous war that Olivares had wanted to avoid to begin with. In 1625, Olivares proposed the, which aimed at raising revenues from the Indies and other kingdoms of Iberia for imperial defense, which met strong opposition. The Union of Arms was the sparking point for a major revolt in Catalonia in 1640. This turmoil also seemed a propitious moment for the Portuguese to revolt against Habsburg rule, with the Duke of Braganza proclaimed as.

While Spinola and the Spanish army were focused on the Netherlands, the war seemed to go in Spain's favor. But in 1627 the Castilian economy collapsed. The Habsburg had been their currency to pay for the war and, just as they had in previous years in Austria. Until 1631, parts of Castile operated on a economy owing to the currency crisis, and the government was unable to collect any meaningful taxes from the peasantry and had to depend on revenue from its colonies. The Spanish armies, like others in German territories, resorted to "paying themselves" on the land.

Olivares had backed certain taxation reforms in Spain pending the end of the war, but was blamed for another embarrassing and fruitless. The Dutch, who during the Twelve Years' Truce had made increasing their navy a priority, (which showed its maturing potency at the 1607), managed to strike a great blow against Spanish maritime trade with the  by captain  of the  on which Spain had become dependent after the economic collapse.

Spanish military resources were stretched across Europe and also at sea as they sought to protect maritime trade against the greatly improved Dutch and French fleets, while still occupied with the Ottoman and associated threat in the Mediterranean. In the meantime the aim of choking Dutch shipping was carried out by the with considerable success. In 1625 a Spanish-Portuguese fleet, under Admiral, regained the strategically vital Brazilian city of from the Dutch. Elsewhere, the isolated and undermanned Portuguese forts in Africa and the Asia proved vulnerable to Dutch and English raids and takeovers or simply being bypassed as important trading posts.

In 1630, of Sweden, one of history's most noted commanders, landed in Germany and relieved the port of, the last continental stronghold of German forces belligerent to the Emperor. Gustavus then marched south and won notable victories at and, attracting more Protestant support with every step he took. By now Spain was deeply involved in saving their Austrian allies from the Swedes who had continued to be wildly successful despite the death of Gustavus at Lützen in 1632. In early September 1634, a Spanish army that had marched from Italy linked with the Imperials at the town of, bringing their total to 33,000 troops. Having severely underestimated the number of experienced Spanish soldiers in the reinforcements, the commanders of the Protestant armies of the decided to offer battle. The seasoned Spanish infantry — which had not been present at any of the battles that had ended in Swedish victories — was mostly responsible for the, which lost 21,000 casualties out of 25,000 men (to only 3,500 for the Catholics).

Alarmed by the Spanish success at Nördlingen and the probable collapse of the Swedish military effort, the chief minister of , realised that it would be necessary to turn the existing cold war into a hot one if Spain, in conjunction with the Austrian Habsburgs was to be stopped from dominating Europe. The French won the in Belgium on 20 May 1635, an early success, but the Spanish defeated a joint  of the Spanish Netherlands before Spanish and Imperial armies cut through Picardy, Burgundy, and Champagne. However, the Spanish offensive stalled before Paris could be targeted, and the French launched counterattacks that drove the Spanish back into Flanders.

At the in 1639 a Spanish fleet carrying troops was destroyed off the English coast, and the Spanish found themselves unable to supply and reinforce their forces adequately in the Netherlands. The, which represented the finest of Spanish soldiery and leadership, faced a French assault led by in northern France at  in 1643. The Spanish, led by, were beaten by the French. After a closely fought battle the Spanish were forced to surrender on honorable terms. As a result, while the defeat was not a rout, the high status of the Army of Flanders was ended at Rocroi. The defeat at Rocroi also led to the dismissal of the embattled Olivares, who was confined to his estates by the king's order and died two years later. The ended the Spanish  in 1648, with Spain recognizing the independence of the Seven United Provinces of the Netherlands.

In 1640, Spain had already experienced the loss of Portugal, following its revolt against Spanish rule, and brought to an end the Iberian Union, and the establishment of the under king. He had received widespread support from the Portuguese people, and Spain was unable to respond, since it was at war with France and Catalonia revolted that year. with the war against France. Spain and Portugal co-existed in a de facto state of peace from 1644 to 1656. When John died in 1656, the Spanish attempted to wrest Portugal from his son but were defeated at  (1663) and  (1665), leading to Spain's recognition of Portugal's independence in 1668, during the regency of Philip IV's young heir, Charles II, who was seven at the time.

continued for eleven more years. Although France suffered from a civil war from 1648 to 1652 (see ), Spain had been exhausted by the Thirty Years' War and the ongoing revolts. With the war against the United Provinces at an end in 1648, the Spanish drove the French out of Naples and Catalonia in 1652, recaptured Dunkirk, and occupied several northern French forts that they held until peace was made. The war came to an end soon after the, where the French army under retook Dunkirk. Spain agreed to the in 1659 that ceded to France the Spanish Netherlands territory of  and the northern Catalan county of. Some 200,000–300,000 French were killed or wounded in the struggle against Spain from 1635 to 1659.

France was now the dominant power on continental Europe, and the United Provinces were dominant in the Atlantic. The (1647–1652) killed up to 25% of 's population. Sevilla, and indeed the economy of Andalucía, would never recover from such complete devastation. Altogether Spain was thought to have lost 500,000 people, out of a population of slightly fewer than 10,000,000, or nearly 5% of its entire population. Historians reckon the total cost in human lives due to these plagues throughout Spain, throughout the entire 17th century, to be a minimum of nearly 1.25 million. In the Indies, Spanish claims were effectively challenged in the Caribbean by the English, the French, and the Dutch, which all established permanent colonies there, after raiding and trading starting in the late sixteenth century. Although the islands' loss barely diminished its American territories, the islands were strategically located and held political, military, and economic advantages in the long run. Spain's main Caribbean strongholds of Cuba and Puerto Rico remained in crown hands, but and  which Spain claimed but did not occupy were vulnerable. The English settled (1623–25),  (1627);  (1628);  (1632), and  (1632); it captured  in 1655. The French settled in in  and  in 1635; and the Dutch acquired trading bases in, , and St Martin.

Charles II and the End of the Spanish Habsburg Era
The Spain that the sickly young Charles II (1661-1700) inherited was clearly in decline and there were more losses immediately. Charles became monarch in 1665 when he was four years old, so a regency of his mother and a five-member government junta ruled in his name, headed by his natural half-brother. Under the regency, prosecuted the  against the  in 1667–68, losing considerable prestige and territory, including the cities of  and. In the of 1672–1678, Spain lost still more territory when it came to the assistance of its former Dutch enemies, most notably.

In the (1688–1697) Louis XIV once again invaded the Spanish Netherlands. French forces led by the defeated the Spanish at  (1690) and subsequently defeated Dutch forces under, who fought on Spain's side. The war ended with most of the Spanish Netherlands under French occupation, including the important cities of and. The war revealed to Europe the vulnerability of the Spanish defenses and bureaucracy. Further, the ineffective Spanish Habsburg government took no action to improve them.

Spain suffered utter decay and stagnation during the final decades of the seventeenth century. While the rest of Western Europe went through exciting changes in government and society – the in England and the reign of the  in France – Spain remained adrift. The Spanish bureaucracy that had built up around the charismatic, industrious, and intelligent and  demanded a strong and hardworking monarch; the weakness and lack of interest of  and  contributed to Spain's decay. was childless and weak ruler, known as "The Bewitched." In his last will and testament he left his throne to a French prince, the, rather than to another Habsburg. This resulted in the, with the Austrian Habsburg and the British challenging Charles II's choice of a Bourbon prince to succeed him as king.

Spanish America
To the end of its imperial rule, Spain called its overseas possessions in the Americas and the Philippines "The Indies," an enduring remnant of Columbus's notion that he had reached Asia by sailing west. When these territories reach a high level of importance, the crown established the in 1524, following the, asserting permanent royal control over its possessions. Regions with dense indigenous populations and sources of mineral wealth attracting Spanish settlers became colonial centers, while those without such resources were peripheral to crown interest. Once regions incorporated into the empire and their importance assessed, overseas possessions came under stronger or weaker crown control. The crown learned its lesson with the rule of Christopher Columbus and his heirs in the Caribbean, and they never subsequently gave authorization of sweeping powers to explorers and conquerors. The ' conquest of Granada in 1492 and their expulsion of the Jews "were militant expressions of religious statehood at the moment of the beginning of the American colonization." The crown's power in the religious sphere was absolute in its overseas possessions through the papacy's grant of the, and "Catholicism was indissolubly linked with royal authority." Church-State relations were established in the conquest era and remained stable until the end of the Habsburg era in 1700, when the Bourbon monarchs implemented and changed the relationship between crown and altar.

The crown's administration of its overseas empire was implemented by royal officials in both the civil and religious spheres, often with overlapping jurisdictions. The crown could administer the empire in the Indies by using native elites as intermediaries with the large indigenous populations. Administrative costs of empire were kept low, with a small number of Spanish officials generally paid low salaries. Crown policy to maintain a closed commercial system limited to one port in Spain and only a few in the Indies was in practice not closed, with European merchant houses supplying Spanish merchants in the Spanish port of Seville with high quality textiles and other manufactured goods that Spain itself could not supply. Much of the silver of the Indies was diverted into those European merchant houses. Crown officials in the Indies enabled the creation of a whole commercial system in which they could coerce native populations to participate while reaping profits themselves in cooperation with merchants.

Explorers, conquerors, and expansion of empire
After Columbus, the was led by a series of soldiers-of-fortune and explorers called. The Spanish forces, in addition to significant armament and equestrian advantages, exploited the rivalries between competing, tribes, and nations, some of which were willing to form alliances with the Spanish in order to defeat their more-powerful enemies, such as the or —a  that would be extensively used by later European colonial powers. The Spanish conquest was also facilitated by the spread of diseases (e.g. ), common in Europe but never present in the New World, which reduced the. This sometimes caused a labor shortage for plantations and public works and so the colonists informally and gradually, at first, initiated the. (see )

One of the most accomplished conquistadors was, who, leading a relatively small Spanish force but with local translators and the crucial support of thousands of native allies, achieved the in the campaigns of 1519–1521. This territory later became the, present day. Of equal importance was the by, which would become the.

After the conquest of Mexico, rumors of golden cities ( in North America and in South America) motivated several other expeditions. Many of those returned without having found their goal, or finding it much less valuable than was hoped. Indeed, the New World colonies only began to yield a substantial part of the Crown's revenues with the establishment of mines such as that of (Bolivia) and  (Mexico) both started in 1546. By the late 16th century, silver from the Americas accounted for one-fifth of Spain's total budget.

Eventually the world's stock of precious metal was doubled or even tripled by silver from the Americas. Official records indicate that at least 75% of the silver was taken across the Atlantic to Spain and no more than 25% across the Pacific to China. Some modern researchers argue that due to rampant smuggling about 50% went to China. In the 16th century "perhaps 240,000 Europeans" entered American ports.

Further Spanish settlements were progressively established in the New World: New Granada in the 1530s (later in the in 1717 and present day ),  in 1535 as the capital of the, Buenos Aires in 1536 (later in the  in 1776), and  in 1541.

Florida was colonized in 1565 by when he founded  and then promptly defeated an attempt led by the French Captain  and 150 of his countrymen to establish a French foothold in  territory. Saint Augustine quickly became a strategic defensive base for the Spanish ships full of gold and silver being sent to Spain from its New World dominions.

The Portuguese mariner sailing for Castile,, died while in the Philippines commanding a Castilian expedition in 1522, which was the the. The commander  led the expedition to success. Spain sought to enforce their rights in the, which led a conflict with the Portuguese, but the issue was resolved with the (1525), settling the location of the  of Tordesillas, which would divide the world into two equal. From then on, maritime expeditions led to the discovery of several archipelagos in the South Pacific as the, the , , , the or , to which Spain laid claim.

Most important in Pacific exploration was the claim on the, which was populous and strategically located for the Spanish settlement of Manila and entrepôt for trade with China. On 27 April 1565, the first permanent Spanish settlement in the was founded by  and the service of s was inaugurated. The Manila Galleons shipped goods from all over Asia across the Pacific to on the coast of Mexico. From there, the goods were transshipped across Mexico to the s, for shipment to Spain. The Spanish trading port of facilitated this trade in 1572. Although Spain claimed islands in the Pacific, it did not encounter or claim the Hawaiian Islands. The control of, , , and came later, from the end of the 17th century, and remained under Spanish control until 1898.

In the eighteenth century, Spain was concerned with Russian and British expansion in the Pacific Northwest of North America and sent to explore and further shore up Spanish claims to the region.

Ordering colonial society – social structure and legal status
Codes regulated the status of individuals and groups in the empire in both the civil and religious spheres, with Spaniards (peninsular- and American-born) monopolizing positions of economic privilege and political power. Royal law and Catholicism codified and maintained hierarchies of class and race, while all were subjects of the crown and mandated to be Catholic. The crown took active steps to establish and maintain Catholicism by evangelizing the pagan indigenous populations, as well as African slaves not previously Christian, and incorporating them into Christendom. The Catholicism remains the dominant religion in Spanish America. The crown also imposed restrictions on emigration to the Americas, excluding Jews and, Protestants, and foreigners, using the Casa de Contratación to vet potential emigres and issue licenses to travel.

The portrait to the right was most likely used as a souvenir. For those who traveled to the New World and back it was common to bring back souvenirs as there were a great interest in what the New World meant. The land would be significantly different but there was a special emphasis put on the emerging mixed races. Not only was there whites mixing with blacks but there were natives mixing with both whites and blacks as well. From a Spanish viewpoint, the castas paintings would most-likely have provided a sort of sense to the madness that was mixed races. There were political implications of this portrait as well. The mestizo child appears to be literate with a satisfied grin facing his father alluding to the opportunity the child has due to his father being European.

A central question from the time of first Contact with indigenous populations was their relationship to the crown and to Christianity. Once those issues were resolved theologically, in practice the crown sought to protect its new vassals. It did so by dividing peoples of the Americas into the República de Indios, the native populations, and the República de Españoles. The República de Españoles was the entire Hispanic sector, composed of Spaniards, but also Africans (enslaved and free), as well as mixed-race s.

Within the República de Indios, men were explicitly excluded from ordination to the Catholic priesthood and obligation for military service as well as the jurisdiction of the Inquisition. Indians under colonial rule who lived in pueblos de indios had crown protections due to their statuses as legal minors. Due to the lack of prior exposure to the Catholic faith, Queen Isabella had declared all indigenous peoples her subjects. This differed from people of the African continent because these populations had theoretically been exposed to Catholicism and chose not to follow it. This religious differentiation is important because it gave indigenous communities legal protections from members of the Républica de Españoles. In fact, an often overlooked aspect of the colonial legal system was that members of the pueblos de indios could appeal to the crown and circumvent the legal system in the Républica de Españoles. The statuses of the indigenous populations as legal minors barred them from becoming priests, but the républica de indios operated with a fair amount of autonomy. Missionaries also acted as guardians against encomendero exploitation. Indian communities had protections of traditional lands by the creation of community lands that could not be alienated, the fondo legal. They managed their own affairs internally through Indian town government under the supervision of royal officials, the corregidores and alcaldes mayores. Although indigenous men were barred from becoming priests, indigenous communities created religious under priestly supervision, which functioned as burial societies for their individual members, but also organized community celebrations for their patron saint. Blacks also had separate confraternities, which likewise contributed to community formation and cohesion, reinforcing identity within a Christian institution.

Conquest and evangelization were inseparable in Spanish America. The first order to make the trip to the Americas were the Franciscans, led by Pedro de Gante. Franciscans believed that living a spiritual life of poverty and holiness was the best way to be an example that inspired others to convert. The friars would walk into the towns barefoot as a display of their surrender to God in a sort of theater of conversion. With this began the practice of evangelization of the peoples of the new world as supported by the Spanish government. Religious orders in Spanish America had their own internal structures and were organizationally autonomous, but nonetheless were very important to the structure of colonial society. They had their own resources and hierarchies. Though some orders took vows of poverty, by the time the second wave of friars came to the Americas and as their numbers grew, the orders began amassing wealth and thus became key economic players. The church, as this wealthy power, had huge estates and built large constructions such as gilded monasteries and cathedrals. Priests themselves also became wealthy landowners. Orders like the Franciscans also established schools for the indigenous elites as well as hired indigenous laborers, thereby shifting the dynamics in the indigenous communities and their relationship to the Spanish.

After the fall of the Aztec and Inca empires, the rulers of the empires were replaced by the Spanish monarchy, while retaining much of the hierarchical indigenous structures. The crown recognized noble status of elite Indians, giving them exemption from the head-tax and the right to use the nobles title don and doña. Indigenous noblemen were a key group for the administration of the Spanish Empire, since they served as intermediaries between crown officials and indigenous communities. Indigenous noblemen could serve on cabildos, ride horses, and carry firearms. The crown's recognition of indigenous elites as nobles meant that these men were incorporated into colonial system with privileges separating them from Indian commoners. Indian noblemen were thus crucial to the governance of the huge indigenous population. Through their continued loyalty to the crown, they maintained their positions of power within their communities but also served as agents of colonial governance. The Spanish Empire's utilization of local elites to rule large populations that are ethnically distinct from the rulers has long been practiced by earlier empires. Indian s were crucial in the early Spanish period, especially when the economy was still based on extracting tribute and labor from commoner Indians who had rendered goods and service to their overlords in the prehispanic period. Caciques mobilized their populations for encomenderos and, later, repartimiento recipients chosen by the crown. The noblemen became the officers of the cabildo in indigenous communities, regulating internal affairs, as well as defending the communities’ rights in court. In Mexico, this was facilitated by the 1599 establishment of the (Juzgado General de Indios), which heard legal disputes in which indigenous communities and individuals were engaged. With legal mechanisms for dispute-resolution, there were relatively few outbreaks of violence and rebellion against crown rule. Eighteenth-century rebellions in long-peaceful areas of Mexico, the and most spectacularly in Peru with the  (1780–81) saw indigenous noblemen leading uprisings against the Spanish state.

In the República de Españoles, class and race hierarchies were codified in institutional structures. Spaniards emigrating to The Indies were to be Old Christians of, with the crown excluding , converts from Judaism and their descendants, because of their suspect religious status. The crown established the Inquisition in Mexico and Peru in 1571, and later Cartagena de Indias (Colombia), to guard Catholics from the influence of, Protestants, and foreigners. Church practices established and maintained racial hierarchies by recording baptism, marriage, and burial were kept separate registers for different racial groups. Churches were also physically divided by race.

Race mixture () was a fact of colonial society, with the three racial groups, European whites (españoles), Africans (negros), and Indians (indios) producing mixed-race offspring, or s. There was a pyramid of racial status with the apex being the small number of European white (españoles), a slightly larger number of mixed-race castas, who, like the whites were mainly urban dwelling, and the largest populations were Indians living in communities in the countryside. Although Indians were classified as part of the Repúbica de Indios, their offspring of unions with Españoles and Africans were castas. White-Indian mixtures were more socially acceptable in the Hispanic sphere, with the possibility over generations of mixed-race offspring being classified as Español. Any offspring with African ancestry could never remove the "stain" of their racial heritage, since Africans were seen as "natural slaves." Eighteenth-century paintings depicted elites' ideas of the in hierarchical order, but there was some fluidity in the system rather than absolute rigidity.

The criminal justice system in Spanish cities and towns meted out justice depending on the severity of the crime and the class, race, age, health, and gender of the accused. Non-whites (blacks and mixed-race castas) were far more often and more severely punished, while Indians, considered legal minors, were not expected to behave better and were more leniently punished. Royal and municipal legislation attempted to control the behavior of black slaves, who were subject to a curfew, could not carry arms, and were prohibited from running away from their masters. As the urban, white, lower-class (plebeian) population increased, they too were increasingly subject to criminal arrest and punishment. Capital punishment was seldom employed, with the exception of sodomy and recalcitrant prisoners of the Inquisition, whose deviation from Christian orthodoxy was considered extreme. However, only the civil sphere could exercise capital punishment and prisoners were “relaxed,” that is, released to civil authorities. Often criminals served sentences of hard labor in textile workshops (obrajes), presidio service on the frontier, and as sailors on royal ships. Royal pardons to ordinary criminals were often accorded on the celebration of a royal marriage, coronation, or birth.

Elite Spanish men had access to special corporate protections (s) and had exemptions by virtue of their membership in a particular group. One important privilege was their being judged by the court of their corporation. Members of the clergy held the fuero eclesiástico were judged by ecclesiastical courts, whether the offense was civil or criminal. In the eighteenth century the crown established a standing military and with it, special privileges (fuero militar). The privilege extended to the military was the first fuero extended to the non-whites who served the crown. Indians had a form of corporate privilege through their membership in indigenous communities. In central Mexico, the crown established a special Indian court (Juzgado General de Indios), and legal fees, including access to lawyers, were funded by a special tax. The crown extended the peninsular institution of the merchant guild () first established in Spain, including Seville (1543), and later established in Mexico City and Peru. Consulado membership was dominated by peninsular-born Spaniards, usually members of transatlantic commercial houses. The consulados’ tribunals heard disputes over contracts, bankruptcy, shipping, insurance and the like and became a wealthy and powerful economic institution and source of loans to the viceroyalties. Transatlantic trade remained in the hands of mercantile families based in Spain and the Indies. The men in the Indies were often younger relatives of the merchants in Spain, who often married wealthy American-born women. American-born Spanish men (criollos) in general did not pursue commerce but instead owned landed estates, entered the priesthood, or became a professional. Within elite families then peninsular-born Spaniards and criollos were often kin.

The regulation of the social system perpetuated the privileged status of wealthy elite white men against the vast indigenous populations, and the smaller but still significant number of mixed-race castas. In the Bourbon era, for the first time there was a distinction made between Iberian-born and American-born Spaniards, In the Habsburg era, in law and ordinary speech they were grouped together without distinction. Increasingly American-born Spaniards developed a distinctly local focus, with peninsular-born (peninsulares) Spaniards increasingly seen as outsiders and resented, but this was a development in the late colonial period. Resentment against peninsulares was due to a deliberate change in crown policy, which systematically favored them over American-born criollos for high positions in the civil and religious hierarchies. This left criollos only the membership in a city or town's cabildo. When the secularizing Bourbon monarchy pursued policies strengthening secular royal power over religious power, it attacked the fuero eclesiástico, which for many members of the lower clergy was a significant privilege. Parish priests who had functioned as royal officials as well as clerics in Indian towns lost their privileged position. At the same time the crown established a standing army and promoted militias for the defense of empire, creating a new avenue of privilege for creole men and for castas, but excluding indigenous men from conscription or voluntary service.

Economic policy
The Spanish Empire benefited from favorable in its overseas possessions with their large, exploitable, indigenous populations and rich mining areas. Given that, the crown attempted to create and maintain a classic, closed, warding off competitors and keeping wealth within the empire. While the Habsburgs were committed to maintaining a state monopoly in theory, in reality the Empire was a porous economic realm and smuggling was widespread. In the 16th and 17th century under the Habsburgs, Spain experienced a gradual decline in economic conditions, especially relative to the industrial development of its French, Dutch, and English rivals. Many of the goods being exported to the Empire originated from manufacturers in northwest Europe, rather than in Spain. But illicit commercial activities became a part of the Empire's administrative structure. Supported by large flows of silver from America, trade prohibited by Spanish mercantilist trade restrictions flourished, because it provided a source of income to both crown officials and private merchants. The local administrative structure in Buenos Aires, for example, was established through its oversight of both legal and illegal commerce. In the eighteenth century the crown attempted to reverse course under the Bourbon monarchs. The crown's pursuit of wars to maintain and expand territory, defend the Catholic faith and stamp out Protestantism, and beat back Ottoman Turkish strength outstripped its ability to pay for it all, despite the huge production of silver in Peru and Mexico. Most of that flow paid mercenary soldiers in the European religious wars in the sixteenth and seventeenth centuries and into foreign merchants’ hands to pay for the consumer goods manufactured in northern Europe. Paradoxically the wealth of the Indies impoverished Spain and enriched northern Europe. In the eighteenth century the crown attempted to reverse course under the Bourbon monarchs.

This was well recognized in Spain, with writers on political economy, the  sending the crown lengthy analyses in the form of "memorials, of the perceived problems and with proposed solutions. According to these thinkers, "Royal expenditure must be regulated, the sale of office halted, the growth of the church checked. The tax system must be overhauled, special concessions be made to agricultural laborers, rivers be made navigable and dry lands irrigated. In this way alone could Castile's productivity increased, its commerce restored, and its humiliating dependence on foreigners, on the Dutch and the Genoese, be brought to an end."

From the early days of the Caribbean and conquest era, the crown attempted to control trade between Spain and the Indies with restrictive policies enforced by the House of Trade (est. 1503) in Seville. Shipping was through particular ports in Spain (Seville, subsequently Cadiz), Spanish America (Veracruz, Acapulco, Havana, Cartagena de Indias, and Callao/Lima) and the Philippines (Manila). Spanish settlers in the Indies in the very early period were few and Spain could supply sufficient goods to them. But as the Aztec and Inca empires were conquered in the early sixteenth century and then large deposits of silver found in both Mexico and Peru, the regions of those major empires, Spanish immigration increased and demand for goods rose far beyond Spain's ability to supply it. Since Spain had little capital to invest in the expanding trade and no significant commercial group, bankers and commercial houses in Genoa, Germany, The Netherlands, France, and England supplied both investment capital and goods in a supposedly closed system. Even in the sixteenth century, Spain recognized that the idealized closed system did not function in reality. Despite that the crown did not alter its restrictive structure or advocacy of fiscal prudence, despite the pleas of the s, the Indies trade remained nominally in the hands of Spain, but in fact enriched the other European countries. The crown established the system of (flota) to protect the conveyance of silver to Seville (later Cadiz). Merchants in Seville conveyed consumer goods that were registered and taxed by the House of Trade. were sent to the Indies were produced in other European countries. Other European commercial interests came to dominate supply, with Spanish merchant houses and their guilds (s) in Spain and the Indies acting as mere middlemen, reaping profits a slice of the profits. However, those profits did not promote Spanish economic development of a manufacturing sector, with its economy continuing to be based on agriculture. The wealth of the Indies led to prosperity in northern Europe, particularly The Netherlands and England, both Protestant. As Spain's power weakened in the seventeenth century, England, The Netherlands, and the French took advantage overseas by seizing islands in the Caribbean, which became bases for a burgeoning contraband trade in Spanish America. Crown officials who were supposed to suppress contraband trade were quite often in cahoots with the foreigners, since it was a source of personal enrichment. In Spain, the crown itself participated in collusion with foreign merchant houses, since they paid fines, "meant to establish a compensation to the state for losses through fraud." it became for merchant houses a calculated risk for doing business; for the crown it gained income it would have lost otherwise. Foreigner merchants were part of the supposed monopoly system of trade. The transfer of the House of Trade from Seville to Cadiz meant even easier access of foreign merchant houses to the Spanish trade.

The motor of the Spanish imperial economy that had a global impact was. The mines in Peru and Mexico were in the hands of a few elite mining entrepreneurs, with access to capital and a stomach for the risk mining entailed. They operated under a system of royal licensing, since the crown held the rights to subsoil wealth. Mining entrepreneurs assumed all the risk of the enterprise, while the crown gained a 20% slice of the profits, the (“Quinto”). Further adding to the crown's revenues was mining was that it crown held a monopoly on the supply of mercury, used for separating pure silver from silver ore in the. The crown kept the price high, thereby depressing the volume of silver production. Protecting its flow from Mexico and Peru as it transited to ports for shipment to Spain resulted early on in a convoy system (the flota) sailing twice a year. Its success can be judged by the fact that the silver fleet was captured only once, in 1628 by Dutch privateer. That loss resulted in the bankruptcy of the Spanish crown and an extended period of economic depression in Spain. One practice used by the Spanish to gather workers for the mines was called repartimiento. This was a rotational forced labor system where indigenous pueblos were obligated to send laborers to work in Spanish mines and plantations for a set number of days out of the year. Repartimiento was not implemented to replace slave labor but instead existed alongside free wage labor, slavery, and indentured labor. It was, however, a way for the Spanish to procure cheap labor thus boosting the mining-driven economy. It is important to note that the men who worked as repartimiento laborers were not always resistant to the practice. Some were drawn to the labor as a way to supplement the wages they earned cultivating fields so as to support their families and, of course, pay tributes. At first, a Spaniard could get repartimiento laborers to work for them with permission from a crown official, such as a viceroy, only on the basis that this labor was absolutely necessary to provide the country with important resources. This condition became laxer as the years went on and various enterprises had repartimiento laborers where they would work in dangerous conditions for long hours and low wages.

During the Bourbon era, economic reforms sought to reverse the pattern that left Spain impoverished with no manufacturing sector and its colonies’ need for manufactured goods supplied by other nations. It attempted to restructure to establish as closed trading system, but it was hampered by the terms of the 1713 Treaty of Utrecht. The treaty ending the War of the Spanish Succession with a victory for the Bourbon French candidate for the throne had a provision for the British to legally trade by a license () African slaves to Spanish America. The provision undermined the possibility of a revamped Spanish monopoly system. The merchants also used the opportunity to engage in contraband trade of their manufactured goods. Crown policy sought to make legal trade more appealing than contraband by instituting free commerce (comercio libre) in 1778 whereby Spanish American ports could trade with each other and they could trade with any port in Spain. It was aimed at revamping a closed Spanish system and outflanking the increasingly powerful British empire. Silver production revived in the eighteenth century, with production far surpassing the earlier output. The crown reducing the taxes on mercury, meaning that a greater volume of pure silver could be refined. Silver mining absorbed most available capital in Mexico and Peru, and the crown emphasized the production of precious metals that was sent to Spain. There was some economic development in the Indies to supply food, but a diversified economy did not emerge. The economic reforms of the Bourbon era both shaped and were themselves impacted by geopolitical developments in Europe. The Bourbon Reforms arose out of the. In turn, the crown's attempt to tighten its control over its colonial markets in the Americas led to further conflict with other European powers who were vying for access to them. After a sparking a series of skirmishes throughout the 1700s over its stricter policies, Spain's reformed trade system led to war with Britain in 1796. In the Americas, meanwhile, economic policies enacted under the Bourbons had different impacts in different regions. On one hand, silver production in New Spain greatly increased and led to economic growth. But much of the profits of the revitalized mining sector went to mining elites and state officials, while in rural areas of New Spain conditions for rural workers deteriorated, contributing to social unrest that would impact subsequent revolts.

The Spanish Bourbons: Era of Reform (1700–1808)
With the 1700 death of the childless, the crown of Spain was contested in the. Under the (11 April 1713) ending the war, the French prince of the, Philippe of Anjou, grandchild of , became the king. He retained the Spanish overseas empire in the Americas and the Philippines. The settlement gave spoils to those who had backed a Habsburg for the Spanish monarchy, ceding European territory of the, , , and to Austria;  and parts of Milan to the , and  and  to the. The treaty also granted the British the exclusive right to in  for thirty years, the , as well as licensed voyages to ports in Spanish colonial dominions, openings, for both licit and illicit trade.

Spain's economic and demographic recovery had begun slowly in the last decades of the Habsburg reign, as was evident from the growth of its trading convoys and the much more rapid growth of illicit trade during the period. (This growth was slower than the growth of illicit trade by northern rivals in the empire's markets.) However, this recovery was not then translated into institutional improvement, rather the "proximate solutions to permanent problems." This legacy of neglect was reflected in the early years of Bourbon rule in which the military was ill-advisedly pitched into battle in the (1718–1720). Following the war, the new Bourbon monarchy took a much more cautious approach to international relations, relying on a family alliance with Bourbon France, and continuing to follow a program of institutional renewal.

The crown program to enact reforms that promoted administrative control and efficiency in the metropole to the detriment of interests in the colonies undermined creole elites' loyalty to the crown. When French forces of invaded the Iberian peninsula in 1808, Napoleon ousted the Spanish Bourbon monarchy, placing his brother  on the Spanish throne. There was a crisis of legitimacy of crown rule in Spanish America, leading to the (1808-1826).

Bourbon reforms
The Spanish Bourbons' broadest intentions were to reorganize the institutions of empire to better administer it for the benefit of Spain and the crown. It sought to increase revenues and to assert greater crown control, including over the Catholic Church. Centralization of power was to be for the benefit of the crown and the metropole and for the defense of its empire against foreign incursions. From the viewpoint of Spain, the structures of colonial rule under the Habsburgs were no longer functioning to the benefit of Spain, with much wealth being retained in Spanish America and going to other European powers. The presence of other European powers in the Caribbean, with the English in (1627),  (1623-5), and  (1655); the Dutch in, and the French in Saint Domingue (Haiti) (1697), Martinique, and Guadaloupe had broken the integrity of the closed Spanish mercantile system and established thriving sugar colonies.

At the beginning of his reign, the first Spanish Bourbon, King Philip V, reorganized the government to strengthen the executive power of the monarch as was done in France, in place of the deliberative, of Councils.

Philip's government set up a ministry of the Navy and the Indies (1714) and established commercial companies, the (1714), a Caracas company, the  (1728), and the most successful one, the  (1740).

In 1717–1718, the structures for governing the Indies, the ' and the ', which governed investments in the cumbersome s, were transferred from to, where foreign merchant houses had easier access to the Indies trade. Cadiz became the one port for all Indies trading (see ). Individual sailings at regular intervals were slow to displace the traditional armed convoys, but by the 1760s there were regular ships plying the Atlantic from Cadiz to and, and at longer intervals to the , where an additional alty was created in 1776. The contraband trade that was the lifeblood of the Habsburg empire declined in proportion to registered shipping (a shipping registry having been established in 1735).

Two upheavals registered unease within Spanish America and at the same time demonstrated the renewed resiliency of the reformed system: the in Peru in 1780 and the  of, both in part reactions to tighter, more efficient control.

18th-century prosperity
The 18th century was a century of prosperity for the overseas Spanish Empire as trade within grew steadily, particularly in the second half of the century, under the Bourbon reforms. Spain's crucial victory in the against a massive British fleet and army in the Caribbean port of, one of a number of successful battles against the British, helped Spain secure its dominance of America until the 19th century. But different regions fared differently under Bourbon rule, and even while New Spain was particularly prosperous, it was also marked by steep wealth inequality. Silver production boomed in New Spain during the 18th century, with output more than tripling between the start of the century and the 1750s. The economy and the population both grew, both centered around Mexico City. But while mine owners and the crown benefited from the flourishing silver economy, most of the population in the rural Bajío faced rising land prices, falling wages. Eviction of many from their lands resulted.

That British Armada was the biggest ever gathered before the which even exceeded in more than 60 ships Philip's II Great Armada. The British fleet formed by 195 ships, 32,000 soldiers and 3,000 artillery pieces commanded by Admiral was defeated by the Admiral. The Battle of Cartagena de Indias was one of the most decisive Spanish victories against the unsuccessful British attempts to take control of the. There were many successful battles that helped Spain secure its dominance of America until the 19th century. Historian Reed Browning describes the British Cartagena expedition as "stupidly disastrous" and quotes Horace Walpole, whose father was Vernon's bitter enemy, writing in 1744: "We have already lost seven millions of money and 30,000 men in the Spanish war and all the fruit of all this blood and treasure is the glory of having Admiral Vernon's head on alehouse signs!"

With a Bourbon monarchy came a repertory of Bourbon ideas based on a centralized state, put into effect in America slowly at first but with increasing momentum during the century. Shipping grew rapidly from the mid-1740s until the (1756–1763), reflecting in part the success of the Bourbons in bringing illicit trade under control. With the loosening of trade controls after the Seven Years' War, shipping trade within the empire once again began to expand, reaching an extraordinary rate of growth in the 1780s.

The end of Cadiz's monopoly of trade with America brought about a rebirth of Spanish manufactures. Most notable was the rapidly growing textile industry of which by the mid-1780s saw the first signs of industrialization. This saw the emergence of a small, politically active commercial class in. This isolated pocket of advanced economic development stood in stark contrast to the relative backwardness of most of the country. Most of the improvements were in and around some major coastal cities and the major islands such as, with its tobacco s, and a renewed growth of s mining in America.

On the other hand, most of rural Spain and its empire, where the great bulk of the population lived, lived in relatively backward conditions by 18th-century West European standards, reinforced old customs and isolation. Agricultural productivity remained low despite efforts to introduce new techniques to what was for the most part an uninterested, exploited peasant and labouring groups. Governments were inconsistent in their policies. Though there were substantial improvements by the late 18th century, Spain was still an economic backwater. Under the trading arrangements it had difficulty in providing the goods being demanded by the strongly growing markets of its empire, and providing adequate outlets for the return trade.

From an opposing point of view according to the "backwardness" mentioned above the naturalist and explorer traveled extensively throughout the Spanish Americas, exploring and describing it for the first time from a modern scientific point of view between 1799 and 1804. In his work Political essay on the kingdom of New Spain containing researches relative to the geography of Mexico he says that the Indians of lived in better conditions than any Russian or German peasant in Europe. According to Humboldt, despite the fact that Indian farmers were poor, under Spanish rule they were free and slavery was non-existent, their conditions were much better than any other peasant or farmer in the advanced Northern Europe.

Humboldt also published a comparative analysis of bread and meat consumption in New Spain (México) compared to other cities in Europe such as Paris. Mexico City consumed 189 pounds of meat per person per year, in comparison to 163 pounds consumed by the inhabitants of Paris, the Mexicans also consumed almost the same amount of bread as any European city, with 363 kilograms of bread per person per year in comparison to the 377 kilograms consumed in Paris. Caracas consumed seven times more meat per person than in Paris. Von Humboldt also said that the average income in that period was four times the European income and also that the cities of New Spain were richer than many European cities.

Contesting with other empires
The Spanish empire had still not returned to first-rate power status, but it had recovered and even extended its territories considerably from the dark days at the beginning of the eighteenth century when it was, particularly in continental matters, at the mercy of other powers' political deals. The relatively more peaceful century under the new monarchy had allowed it to rebuild and start the long process of modernizing its institutions and economy, and the demographic decline of the 17th century had been reversed. It was a middle-ranking power with great power pretensions that could not be ignored. But time was to be against it.

Military recovery in Europe
Bourbon institutional reforms bore fruit militarily when Spanish forces easily  and  from the Austrians in 1734 during the, and during the  (1739–42) thwarted British efforts to seize the strategic cities of  and  by defeating a massive British army and navy led by , which ended Britain's ambitions in the.

In 1742, the War of Jenkins' Ear merged with the larger, and in North America. The British, also occupied with France, were unable to capture Spanish convoys, and the Spanish privateers attacked British merchant shipping along the routes. In Europe, Spain had been trying to divest of Lombardy in northern Italy since 1741, but faced the opposition of, and warfare in northern Italy remained indecisive throughout the period up to 1746.

By the 1748, Spain gained Parma, Piacenza, and Guastalla in northern Italy. Moreover, though Spain was defeated during the and lost some territories to British forces towards the end of the  (1756–63), Spain promptly recovered these losses and  the British naval base in  during the (1775–83).

Role in the American Revolutionary War
Spain contributed to the independence of the (which formed the ) together with France. The Spanish governor of  carried Spanish policies counter to Great Britain, which sought to take treasure and territory from the Spanish. Spain and France were allies because of the Bourbon carried out by both countries against Britain. Gálvez took measures against British smuggling in the Caribbean sea and promoted trade with France. Under royal order from Gálvez continued the aid operations to supply the American rebels. The British blockaded the colonial ports of the Thirteen Colonies, and the route from Spanish-controlled New Orleans up to the Mississippi river was an effective alternative to supply the American rebels. Spain actively supported the thirteen colonies throughout the, beginning in 1776 by jointly funding , a trading company that provided critical military supplies, throughout financing the final in 1781 with a collection of gold and silver from Havana.

Spanish aid was supplied to the colonies via four main routes: (1)from French ports with the funding of Roderigue Hortalez and Company; (2)through the port of New Orleans and up the Mississippi river; (3)from warehouses in Havana; and (4)from the northwestern Spanish port of Bilbao, through the family trading company which supplied significant war materiel.

Britain blockaded the thirteen colonies economically, so the American public debt increased dramatically. Spain, through the Gardoqui family, sent 120,000 silver 8 real coin, known as a, the coin upon which the original United States dollar was based, and it remained legal tender in the United States until the coinage act of 1857 (in fact the Spanish dollar or Carolus became the first global currency in the 18th century).

The Americans' Continental Army that won the was partially equipped and armed by Spain. Spain had the chance to recover territories lost to Britain in the, particularly. Galvez gathered an army from all corners of Spanish America, around 7,000 men. The Governor of Spanish Louisiana prepared an offensive against the British at the to control the lower Mississippi and Florida. Gálvez completed the conquest of West Florida in 1781 with the successful.

Shortly thereafter, Gálvez conquered island in, aborting the last British resistance plan, which kept the Spanish dominion over the Caribbean and accelerated the triumph of the American army. Jamaica was the last British stronghold of importance in the Caribbean. Gálvez organized a landing on the island; however, the was concluded and the invasion cancelled.

Contestation in Brazil
The majority of the territory of today's Brazil had been claimed as Spanish when exploration began with the navigation of the length of the in 1541–42 by. Many Spanish expeditions explored large parts of this vast region, especially those close to Spanish settlements. During the 16th and 17th centuries, Spanish soldiers, missionaries and adventurers also established pioneering communities, primarily in, Santa Catarina, and , and forts on the northeastern coast threatened by the French and Dutch.

As Portuguese-Brazilian settlement expanded, following in the trail of the exploits, these isolated Spanish groups were eventually integrated into Brazilian society. Only some Castilians who were displaced from the disputed areas of the Pampas of have left a significant influence on the formation of the, when they mixed with Indian groups, Portuguese and blacks who arrived in the region during the 18th century. The Spanish were barred by their laws from slaving of indigenous people, leaving them without a commercial interest deep in the interior of the Amazon basin. The Laws of Burgos (1512) and the New Laws (1542) had been intended to protect the interests of indigenous people. The Portuguese-Brazilian slavers, the Bandeirantes, had the advantage of access from the mouth of the Amazon River, which was on the Portuguese side of the line of Tordesillas. One famous attack upon a Spanish mission in 1628 resulted in the enslavement of about 60,000 indigenous people.

In time, there was in effect a self-funding force of occupation. By the 18th century, much of the Spanish territory was under de facto control of Portuguese-Brazil. This reality was recognized with the legal transfer of sovereignty in 1750 of most of the Amazon basin and surrounding areas to Portugal in the. This settlement sowed the seeds of the in 1756.

Rival empires in the Pacific Northwest
Spain claimed all of North America in the Age of Discovery, but claims were not translated into occupation until a major resource was discovered and Spanish settlement and crown rule put in place. The French had established an in northern North America and took some islands in the Caribbean. The English established colonies on the eastern seaboard of North America and in northern North America and some Caribbean islands as well. In the eighteenth century, the Spanish crown realized that its territorial claims needed to be defended, particularly in the wake of its visible weakness during the Seven Years' War when Britain captured the important Spanish ports of Havana and Manila. Another important factor was that the had expanded into North America from the mid-eighteenth century, with  in what is now Alaska and forts as far south as Fort Ross, California. Great Britain was also expanding into areas that Spain claimed as its territory on the Pacific coast. Taking steps to shore up its fragile claims to California, Spain began planning in 1769. Spain also began a series of voyages to the Pacific Northwest, where Russia and Great Britain were encroaching on claimed territory. The, with and others sailing for Spain, came too late for Spain to assert its sovereignty in the Pacific Northwest. The (1789–1791) nearly brought Spain and Britain to war. It was a dispute over claims in the Pacific Northwest, where neither nation had established permanent settlements. The crisis could have led to war, but it was resolved in the, in which Spain and Great Britain agreed to not establish settlements and allowed free access to Nootka Sound on the west coast of what is now. In 1806 Baron attempted to negotiate a treaty between the  and the, but his unexpected death in 1807 ended any treaty hopes. Spain gave up its claims in the West of North America in the of 1819, ceding its rights there to the United States, allowing the U.S. to purchase Florida, and establishing a boundary New Spain and the U.S. When the negotiations between the two nations were taking place, Spain's resources were stretched due to the.

Loss of Spanish Louisiana
The growth of trade and wealth in the colonies caused increasing political tensions as frustration grew with the improving but still restrictive trade with Spain. Malaspina's recommendation to turn the empire into a looser to help improve governance and trade so as to quell the growing political tensions between the élites of the empire's periphery and center was suppressed by a monarchy afraid of losing control. All was to be swept away by the tumult that was to overtake Europe at the turn of the 19th century with the and.

The first major territory Spain was to lose in the 19th century was the vast and wild, which stretched north to Canada and was ceded by France in 1763 under the terms of the. The French, under Napoleon, took back possession as part of the in 1800 and sold it to the United States in the  of 1803. Napoleon's sale of the Louisiana Territory to the United States in 1803 caused border disputes between the United States and Spain that, with rebellions in (1810) and in the remainder of Louisiana at the mouth of the, led to their eventual cession to the United States,

Other challenges to the Spanish Empire
The destruction of the main Spanish fleet, under French command, at the (1805) undermined Spain's ability to defend and hold on to its empire. The attempted to seize the  in 1806. The retreated hastily to the hills when defeated by a small British force. However, the ' militias and colonial army eventually repulsed the British. The later intrusion of Napoleonic forces into Spain in 1808 (see ) cut off the effective connection with the empire. A combination of internal and external factors led to the unforeseen loss of most of Spain's empire in the Indies in the.

End of the global empire (1808–1899)
In 1808, Napoleon forces invaded the Iberian peninsula, resulting in the evacuation of the Portuguese royal family to Brazil and the of the Spanish King. Napoleon placed his brother,, on the Spanish throne, provoking an uprising from the Spanish people, the , a grinding that Napoleon dubbed his "ulcer". Throughout the course of the war, an estimated 180,000 Imperial troops were killed by Spanish guerrillas.

The war was famously depicted by the painter. The French invasion also sparked in many places in Spanish America a crisis of legitimacy of crown rule and movements that resulted in political independence. In Spain, political uncertainty lasted over a decade and turmoil for several decades, civil wars on succession disputes, a republic, and finally a. Resistance coalesced around, emergency ad-hoc governments. A, ruling in the name of , was created on 25 September 1808 to coordinate efforts among the various juntas.

Spanish American conflicts and independence 1810-1833
The idea of a separate identity for Spanish America has been developed in the modern historical literature, but the idea of complete Spanish American independence from the Spanish Empire was not general at the time and political independence was not inevitable. Historian Brian Hamnett argues that had the Spanish monarchy and Spanish liberals been more flexible regarding the place of the overseas possessions, that the empire would not have collapsed. Juntas emerged in Spanish America as Spain faced a political crisis due to the invasion by Napoleon Bonaparte and abdication of Ferdinand VII. Spanish Americans reacted in much the same way the Peninsular Spanish did, legitimizing their actions through traditional law, which held that sovereignty reverted to the people in the absence of a legitimate king.

The majority of Spanish Americans continued to support the idea of maintaining a, but did not support retaining under Ferdinand VII. Spanish Americans wanted self-government. The juntas in the Americas did not accept the governments of the Europeans – neither the government set up for Spain by the French nor the various Spanish Governments set up in response to the French invasion. The juntas did not accept the Spanish regency, isolated under (1810–1812). They also rejected the although the Constitution gave Spanish citizenship those in the territories that had belonged to the Spanish monarchy in both hemispheres. The liberal Spanish Constitution of 1812 recognized as Spanish citizens. But the acquisition of citizenship for any of  was through  – excluding.

A long period of wars followed in America from 1811 to 1829. In South America this period of wars led to the independence of (1810),  (1810),  (1810),  (1811) and  (1815, but subsequently ruled by Brazil until 1828). campaigned for independence in (1818) and in  (1821). Further north, led forces that won independence between 1811 and 1826 for the area that became, , ,  and  (then ). declared independence in 1821 and merged with the (from 1821 to 1903). In the Viceroyalty of New Spain, free-thinking secular priest,, declared Mexican freedom in 1810 in the. Independence was actually won in 1821 by a royalist army officer turned insurgent,, in alliance with insurgent and under the. The conservative Catholic hierarchy in supported Mexican independence largely because it found the liberal Spanish  abhorrent. Central America provinces became independent via Mexico's independence in 1821 and joined Mexico for a brief time (1822–23), but they chose their own path when Mexico became a republic in 1824.

The Spanish coastal fortifications in Veracruz, Callao and Chiloé were the footholds that resisted until 1825 and 1826 respectively. In Spanish America, Royalist guerrillas continued the war in several countries, and Spain launched attempts to retake Venezuela in 1827 and Mexico in 1829. Spain abandoned all plans of military re-conquest at the death of King Ferdinand VII in. Finally the Spanish government went so far as to renounce sovereignty over all of continental America in 1836.

Loss of Remnants in the Indies (1865-1899)
likewise declared independence in 1821 and began negotiating for inclusion in Bolivar's, but was quickly occupied by , which ruled it until. After 17 years of independence, in 1861, Santo Domingo was again due to Haitian aggression, making it the only former colony that Spain retook. However, Captain-General met opposition to his occupation of the island after his troops faced both guerrilla uprisings and. In all, 10,888 of Gándara's forces fell in combat against. More devastating was disease, which claimed 30,000 Spaniards.

After 1865, only Cuba and Puerto Rico and the (the,  and nearby Pacific islands) remained under Spanish control in the Indies. The Cuban war for independence was cut short by U.S. intervention in what became known as the in 1898. Spain also lost Puerto Rico and the Philippines in that conflict. The following year, Spain then sold its remaining Pacific Ocean possessions to Germany in the, retaining only its African territories.

Spain in the post-Napoleonic era was in political crisis, with the French invasion and restoration of the Spanish monarchy under the autocratic Ferdinand VII having broken apart any traditional consensus on sovereignty, fragmented the country politically and regionally and unleashed wars and disputes between progressives, liberals and conservatives. The instability inhibited Spain's development, which had started fitfully gathering pace in the eighteenth century. A brief period of improvement occurred in the 1870s when the capable and his thoughtful ministers succeeded in restoring some vigor to Spanish politics and prestige, cut short by Alfonso's early death.

An increasing level of, anti-colonial uprisings in various colonies culminated with the Spanish–American War of 1898, fought primarily over Cuba. Military defeat was followed by the independence of Cuba and the of Puerto Rico, Guam, and the Philippines to the United States, receiving US$20 million in compensation for the Philippines. On 2 June 1899, the second expeditionary battalion of Philippines the last Spanish garrison in the Philippines, which had been  in  at war end, was pulled out, effectively ending around 300 years of Spanish hegemony in the archipelago.

Territories in Africa (1885–1975)
By the end of the 17th century, only Melilla, Alhucemas, Peñón de Vélez de la Gomera (which had been taken again in 1564), (part of the  since 1415, has chosen to retain its links to Spain once the  ended; the formal allegiance of Ceuta to Spain was recognized by the  in 1668), Oran and Mazalquivir remained as Spanish territory in Africa. The latter cities were lost in 1708, reconquered in 1732 and sold by in 1792.

In 1778, (now ), adjacent islets, and commercial rights to the mainland between the  and  Rivers were ceded to Spain by the Portuguese in exchange for territory in South America. In the 19th century, some Spanish explorers and missionaries would cross this zone, among them.

In 1848, Spanish troops conquered the.

In 1860, after the, ceded  to Spain as a part of the , on the basis of the old outpost of Santa Cruz de la Mar Pequeña, thought to be Sidi Ifni. The following decades of Franco-Spanish collaboration resulted in the establishment and extension of Spanish protectorates south of the city, and Spanish influence obtained international recognition in the of 1884: Spain administered Sidi Ifni and  jointly. Spain claimed a over the coast of Guinea from  to, too, and even try to press a claim over the  and  regions in. became a protectorate in 1885 and a colony in 1900. Conflicting claims to the Guinea mainland were settled in 1900 by the, because of which Spain was left with a mere 26,000 km2 out of the 300,000 stretching east to the which they initially claimed.

Following a in 1893, Spain expanded its influence south from Melilla.

In 1911, Morocco was divided between the French and Spanish. The  rebelled, led by, a former officer for the Spanish administration. The  (1921) during the was a sudden, grave, and almost fatal military defeat suffered by the Spanish army against Moroccan insurgents. A leading Spanish politician emphatically declared: "We are at the most acute period of Spanish decadence". After the disaster of Annual, the took place in September 1925 at the bay of Alhucemas. The Spanish Army and Navy with a small collaboration of an allied French contingent put an end to the Rif War. It is considered the first successful amphibious landing in history supported by seaborne air power and tanks.

In 1923, was declared an international city under French, Spanish, British, and later Italian.

In 1926 Bioko and Rio Muni were united as the colony of, a status that would last until 1959. In 1931, following the fall of the monarchy, the African colonies became part of the. In 1934, during the government of Prime Minister, Spanish troops led by General Osvaldo Capaz landed in Sidi Ifni and carried out the occupation of the territory, ceded  by Morocco in 1860. Five years later,, a general of the , rebelled against the republican government and started the (1936–39). During the Second World War the presence in Tangier was overcome by that of.

Spain lacked the wealth and the interest to develop an extensive economic infrastructure in its African colonies during the first half of the 20th century. However, through a system, particularly on, Spain developed large  plantations for which thousands of n workers were imported as laborers.

In 1956, when became independent, Spain surrendered  to the new nation, but retained control of Sidi Ifni, the  region and. Moroccan (later King)  was interested in these territories and invaded Spanish Sahara in 1957, in the, or in Spain, the Forgotten War (la Guerra Olvidada). In 1958, Spain ceded Tarfaya to Mohammed V and joined the previously separate districts of (in the north) and  (in the south) to form the province of.

In 1959, the Spanish territory on the was established with a status similar to the provinces of metropolitan Spain. As the Spanish Equatorial Region, it was ruled by a exercising military and civilian powers. The first local elections were held in 1959, and the first Equatoguinean representatives were seated in the. Under the Basic Law of December 1963, limited autonomy was authorized under a joint legislative body for the territory's two provinces. The name of the country was changed to. In March 1968, under pressure from Equatoguinean nationalists and the United Nations, Spain announced that it would grant the country independence.

In 1969, under international pressure, Spain returned Sidi Ifni to Morocco. Spanish control of Spanish Sahara endured until the 1975 prompted a withdrawal, under Moroccan military pressure. The future of this former Spanish colony remains uncertain.

The and Spanish cities in the African mainland are considered an equal part of Spain and the  but have a different tax system.

Morocco still claims Ceuta, Melilla, and  even though they are internationally recognized as administrative divisions of Spain. was occupied on 11 July 2002 by Moroccan Gendarmerie and troops, who were evicted by forces in a bloodless operation.

Legacy
Although the Spanish Empire declined from its apogee in the middle seventeenth century, it remained a wonder for other Europeans for its sheer geographical span. , English poet questioned, "Has heaven reserved, in pity to the poor,/No pathless waste or undiscovered shore,/No secret island in the boundless main,/No peaceful desert yet unclaimed by Spain?"

The Spanish Empire left a huge linguistic, religious, political, cultural, and urban architectural legacy in the. With over 470 million native speakers today, is the second  in the world, as result of the introduction of the language of Castile—Castilian, "Castellano" —from Iberia to Spanish America, later expanded by the governments of successor independent republics. In the Philippines, the (1898) brought the islands under U.S. jurisdiction, with English being imposed in schools and Spanish becoming.

An important cultural legacy of the Spanish empire overseas is, which remains the main religious faith in Spanish America and the Philippines. Christian evangelization of indigenous peoples was a key responsibility of the crown and a justification for its imperial expansion. Although indigenous were considered neophytes and insufficiently mature in their faith for indigenous men to be ordained to the priesthood, the indigenous were part of the Catholic community of faith. Catholic orthodoxy enforced by the, particularly targeting and Protestants. Not until after their independence in the nineteenth century did Spanish American republics allow of other faiths. Observances of Catholic holidays often have strong regional expressions and remain important in many parts of Spanish America. Observances include, , , , , and national saints' days, such as the in Mexico.

Politically, the colonial era has strongly influenced modern Spanish America. The territorial divisions of the empire in Spanish America became the basis for boundaries between new republics after independence and for state divisions within countries. It is often argued that the rise of during and after Latin American independence movements created a legacy of authoritarianism in the region. There was no significant development of representative institutions during the colonial era, and the executive power was often made stronger than the legislative power during the national period as a result. Unfortunately, this has led to a popular misconception that the colonial legacy has caused the region to have an extremely oppressed proletariat. Revolts and riots are often seen as evidence of this supposed extreme oppression. However, the culture of revolting against an unpopular government is not simply a confirmation of widespread authoritarianism. The colonial legacy did leave a political culture of revolt, but not always as a desperate last act. The civil unrest of the region is seen by some as a form of political involvement. While the political context of the political revolutions in Spanish America is understood to be one in which liberal elites competed to form new national political structures, so too were those elites responding to mass lower-class political mobilization and participation.

Hundreds of towns and cities in the Americas were founded during the Spanish rule, with the colonial centers and buildings of many of them now designated as attracting tourists. The tangible heritage includes universities, forts, cities, cathedrals, schools, hospitals, missions, government buildings and colonial residences, many of which still stand today. A number of present-day roads, canals, ports or bridges sit where Spanish engineers built them centuries ago. The oldest universities in the Americas were founded by Spanish scholars and Catholic missionaries. The Spanish Empire also left a vast. The cultural legacy is also present in the, , and , some of which have been granted the status of.

The long colonial period in resulted in a mixing of indigenous peoples, Europeans, and Africans that were, therefore there was a mixed race society in the Spanish and Portuguese Americas compared to the starkly segregated settler colonies of the British and French in North America.

In concert with the, the Spanish Empire laid the foundations of a truly global trade by opening up the great trans-oceanic trade routes and the exploration of unknown territories and oceans for the western knowledge. The became the world's first global currency.

One of the features of this trade was the exchange of a great array of domesticated plants and animals between the Old World and the New in the. Some cultivars that were introduced to America included grapes, wheat, barley, apples and citrous fruits; animals that were introduced to the New World were horses, donkeys, cattle, sheep, goats, pigs, and chickens. The Old World received from America such things as maize, potatoes, chili peppers, tomatoes, tobacco, beans, squash, cacao (chocolate), vanilla, avocados, pineapples, chewing gum, rubber, peanuts, cashews, Brazil nuts, pecans, blueberries, strawberries, quinoa, amaranth, chia, agave and others. The result of these exchanges was to significantly improve the agricultural potential of not only in America, but also that of Europe and Asia. Diseases brought by Europeans and Africans, such as smallpox, measles, typhus, and others, devastated almost all indigenous populations that had no immunity, with the exchange from the New World to Old.

There were also cultural influences, which can be seen in everything from architecture to food, music, art and law, from Southern and  to the  together with the. The complex origins and contacts of different peoples resulted in cultural influences coming together in the varied forms so evident today in the former colonial areas.