Mexico (México ; Mēxihco), officially the United Mexican States (Estados Unidos Mexicanos, ), 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. Covering almost 2000000 km2, the nation is the fifth largest country in the Americas by total area and the 13th largest independent state in the world. With an estimated population of over 120 million people, the country is the eleventh most populous state and the most populous Spanish-speaking state in the world, while being the second most populous nation in Latin America after Brazil. Mexico is a federation comprising 31 states and Mexico City, a special federal entity that is also the capital city and its most populous city. Other metropolises in the state include Guadalajara, Monterrey, Puebla, Toluca, Tijuana and León.
Pre-Columbian Mexico dates to about 8000 BC and is identified as one of five cradles of civilization and was home to many advanced Mesoamerican civilizations such as the Olmec, Toltec, Teotihuacan, Zapotec, Maya, and Aztec before first contact with Europeans. In 1521, the Spanish Empire conquered and colonized the territory from its politically powerful base in Mexico-Tenochtitlan (part of Mexico City), which was administered as the viceroyalty of New Spain. Three centuries later, the territory became a nation state following its recognition in 1821 after the Mexican War of Independence. The post-independence period was tumultuous, characterized by economic inequality and many contrasting political changes. The Mexican–American War (1846–1848) led to a territorial cession of the extant northern territories to the United States. The Pastry War, the Franco-Mexican War, a civil war, two empires, and the Porfiriato occurred in the 19th century. The Porfiriato was ended by the start of the Mexican Revolution in 1910, which culminated with the promulgation of the 1917 Constitution and the emergence of the country's current political system as a federal, democratic republic.
Mexico has the 15th largest nominal GDP and the 11th largest by purchasing power parity. The Mexican economy is strongly linked to those of its 1994 North American Free Trade Agreement (NAFTA) partners, especially the United States. In 1994, Mexico became the first Latin American member of the Organisation for Economic Co-operation and Development (OECD). It is classified as an upper-middle income country by the World Bank and a newly industrialized country by several analysts. The country is considered both a regional power and a middle power, and is often identified as an emerging global power. Due to its rich culture and history, Mexico ranks first in the Americas and seventh in the world for number of UNESCO World Heritage Sites. Mexico is an ecologically megadiverse country, ranking fourth in the world for its biodiversity. Mexico receives a huge number of tourists every year: in 2018, it was the sixth 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.
Mēxihco is the Nahuatl term for the heartland of the Aztec Empire, namely the Valley of Mexico and surrounding territories, with its people being known as the Mexica, it is generally believed to be a toponym for the valley which became the primary ethnonym for the Aztec Triple Alliance as a result, although it could have been the other way around. In the colonial era, back when Mexico was called New Spain this territory became the Intendency of Mexico and after New Spain achieved independence from the Spanish Empire it came to be known as the State of Mexico with the new country being named after its capital: the City of Mexico, which itself was founded in 1524 on top of the ancient Mexica capital of Mexico-Tenochtitlan.
Traditionally, the name Tenochtitlan was thought to come from Nahuatl tetl ("rock") and nōchtli ("prickly pear") and is often thought to mean "Among the prickly pears [growing among] rocks". However, one attestation in the late 16th-century manuscript known as "the Bancroft dialogues" suggests the second vowel was short, so that the true etymology remains uncertain.
The suffix -co is the Nahuatl locative, making the word a place name. Beyond that, the etymology is uncertain. It has been suggested that it is derived from Mextli or Mēxihtli, a secret name for the god of war and patron of the Mexica, Huitzilopochtli, in which case Mēxihco means "place where Huitzilopochtli lives". Another hypothesis suggests that Mēxihco derives from a portmanteau of the Nahuatl words for "moon" (Mētztli) and navel (xīctli). This meaning ("at the navel of the moon") might refer to Tenochtitlan's position in the middle of Lake Texcoco. The system of interconnected lakes, of which Texcoco formed the center, had the form of a rabbit, which the Mesoamericans pareidolically associated with the moon rabbit. Still another hypothesis suggests that the word is derived from Mēctli, the name of the goddess of maguey.
The name of the city-state was transliterated to Spanish as México with the phonetic value of the letter x in Medieval Spanish, which represented the voiceless postalveolar fricative. This sound, as well as the voiced postalveolar fricative, represented by a j, evolved into a voiceless velar fricative during the 16th century. This led to the use of the variant Méjico in many publications in Spanish, most notably in Spain, whereas in Mexico and most other Spanish–speaking countries, México was the preferred spelling. In recent years, the Real Academia Española, which regulates the Spanish language, determined that both variants are acceptable in Spanish but that the normative recommended spelling is México. The majority of publications in all Spanish-speaking countries now adhere to the new norm, even though the alternative variant is still occasionally used. In English, the 'x' in Mexico represents neither the original nor the current sound, but the consonant cluster.
The official name of the country has changed as the form of government has changed. The declaration of independence signed on November 6, 1813 by the deputies of the Congress of Anáhuac called the territory América Septentrional (Northern America). On two occasions (1821–1823 and 1863–1867), the country was known as Imperio Mexicano (Mexican Empire). All three federal constitutions (1824, 1857 and 1917, the current constitution) used the name Estados Unidos Mexicanos —or the variant Estados-Unidos Mexicanos, all of which have been translated as "United Mexican States". The phrase República Mexicana, "Mexican Republic", was used in the 1836 Constitutional Laws.