The Viceroyalty of New Spain (Spanish: Virreinato de Nueva España) was an integral territorial entity of the Spanish Empire, established by Habsburg Spain during the Spanish colonization of the Americas. It covered a huge area that included much of North America, northern parts of South America and several Pacific Ocean archipelagos, namely the Philippines and Guam. It originated in 1521 after the fall of Tenochtitlan, the main event of the Spanish conquest, and officially created on 18 August 1521 as a kingdom (Spanish: reino), the first of four vice-royalties Spain created in the Americas. Its first viceroy was Antonio de Mendoza y Pacheco, and the capital of the kingdom was Mexico City, established on the ancient Tenochtitlan.
It included what is now Mexico plus the current U.S. states of California, Nevada, Colorado, Utah, New Mexico, Arizona, Texas, Oregon, Washington, Florida and parts of Idaho, Montana, Wyoming, Kansas, Oklahoma, Alabama, Mississippi, and Louisiana; the south-western part of British Columbia of present-day Canada; the Captaincy General of Guatemala (which included the current countries of Guatemala, Belize, Costa Rica, El Salvador, Honduras, Nicaragua, and the Mexican state of Chiapas); the Captaincy General of Cuba (current Cuba, Dominican Republic, Puerto Rico, and Trinidad and Tobago); and the Captaincy General of the Philippines (including the Philippines, Guam, the Northern Mariana Islands, the Caroline Islands, the Federated States of Micronesia, Palau, the Marshall Islands, and the short lived Spanish Formosa in modern-day northern Taiwan, as well as, for a century, the island of Tidore and the briefly occupied Sultanate of Ternate, both in modern-day Indonesia).
Other kingdoms of the Spanish Empire bordered New Spain and were given the right of appeal to the most senior representative of the king. These kingdoms were independent of New Spain (separate from New Spain itself): Nueva Galicia (1530), Captaincy General of Guatemala (1540), Nueva Vizcaya (1562), New Kingdom of León (1569), Santa Fe de Nuevo México (1598), Nueva Extremadura (1674), and Nuevo Santander (1746).
New Spain proper was itself organized in captaincies general. There were four captaincies: Captaincy General of the Philippines (1574), Captaincy General of Cuba, Captaincy General of Puerto Rico, and Captaincy General of Santo Domingo. These independent kingdoms and territorial subdivisions each had their own governor and captain generals (who in New Spain was the viceroy himself, who added this title to his other dignities). In Guatemala, Santo Domingo and Nueva Galicia, these officials were called presiding governors, since they were leading royal audiences. For this reason, these hearings were considered "praetorial".
New Spain developed highly regional divisions, reflecting the impact of climate, topography, indigenous populations, and mineral resources. The areas of central and southern Mexico had dense indigenous populations with complex social, political, and economic organization. The northern area of Mexico, a region of nomadic and semi-nomadic indigenous populations, was not generally conducive to dense settlements, but the discovery of silver in Zacatecas in the 1540s drew settlement there to exploit the mines. Silver mining not only became the engine of the economy of New Spain, but vastly enriched Spain and transformed the global economy. New Spain was the New World terminus of the Philippine trade, making the kingdom a vital link between Spain's New World empire and its Asian empire.
From the beginning of the 19th century, the kingdom fell into crisis, aggravated by the Peninsular War, and its direct consequence in the kingdom, the political crisis in Mexico in 1808, which ended with the government of Viceroy José de Iturrigaray and, later, gave rise to the Conspiracy of Valladolid and the Conspiracy of Querétaro. This last one was the direct antecedent of the Mexican War of Independence, which, when concluding in 1821, disintegrated the vice-royalty and gave way to the Mexican Empire, in which finally Agustín de Iturbide would be crowned.
The Viceroyalty of New Spain was the principal source of income for Spain in the eighteenth century, with the revival of mining under the Bourbon Reforms. Important mining centres like Zacatecas, Guanajuato, San Luis Potosí and Hidalgo had been established in the sixteenth century and suffered decline for a variety of reasons in the seventeenth century, but silver mining in Mexico out performed all other Spanish overseas territories in revenues for the royal coffers. Coinage struck in Spanish Mexico was the de-facto world trade currency until the second half of the 19th century.