Mexico, officially the United Mexican States, is a country in the southern portion of North America. It is bordered to the north by the United States; to the south and west by the Pacific Ocean; to the southeast by Guatemala, Belize, and the Caribbean Sea; and to the east by the Gulf of Mexico. Mexico covers 1,972,550 square kilometers (761,610 sq mi) and has approximately 128,649,565 inhabitants, making it the world's 13th-largest country by area, 10th-most populous country, and most populous Spanish-speaking nation. It is a federation comprising 31 states and Mexico City, its capital city and largest metropolis. Other major urban areas include Guadalajara, Monterrey, Puebla, Toluca, Tijuana, Ciudad Juárez, and León.Pre-Columbian Mexico traces its origins to 8,000 BC and is identified as one of six cradles of civilization; it was home to many advanced Mesoamerican civilizations, most well-known among them the Maya and the Aztecs. In 1521, the Spanish Empire conquered and colonized the territory from its base in Mexico City, which then became known as New Spain. The Catholic Church played an important role as millions of indigenous inhabitants converted. These populations were heavily exploited to mine rich deposits of precious material, which became a major source of wealth for the Spanish. Mexico became an independent nation state after the successful Mexican War of Independence against Spain in 1821.The War of Texas Independence in 1836 and the Mexican–American War led to huge territorial losses in Mexico's sparsely populated north, contiguous to the United States. The newly instituted reforms that granted protection to indigenous communities, and curtailed the power of the military and the church, were enshrined in the Constitution of 1857. This triggered the War of the Reform and French intervention. Maximilian Habsburg was installed as emperor by France and Benito Juárez kept an opposing republican government in exile. The following decades were marked by instability and dictatorship of Porfirio Díaz, who sought to modernize Mexico and restore order. The Porfiriato ended with the Mexican Revolution in 1910 and the winning Constitutionalist faction drafted a new 1917 Constitution. The revolutionary generals of the winning northern faction dominated the 1920s and served as presidents, but the 1928 assassination of Alvaro Obregón led to the formation of the Institutional Revolutionary Party in 1929, under which Mexico was a one-party state until 2000.Mexico is a developing country, ranking 76th on the Human Development Index, but is considered a newly industrialized state by several analysts. It has the world's 15th-largest economy by nominal GDP and the 11th-largest by PPP, with the United States being its largest economic partner. The large economy, area, population and politics make Mexico a regional power and a middle power, and is often identified as an emerging power. However, Mexico continues to struggle with social inequalities, poverty and extensive crime; the country ranks poorly on the Global Peace Index. Since 2006, the conflict between the government and drug trafficking syndicates lead to over 120,000 deaths.Mexico ranks first in the Americas and 7th in the world for the number of UNESCO World Heritage Sites. Mexico is an ecologically megadiverse country, ranking 5th in the world for its natural biodiversity. Mexico receives a significant number of tourists every year; in 2018, it was the 6th most-visited country in the world, with 39 million international arrivals. Mexico is a member of the United Nations (UN), the World Trade Organization (WTO), the G8+5, the G20, the Uniting for Consensus group of the UN, and the Pacific Alliance trade bloc.