Mexico (Spanish: México [ˈmexiko] ; Nahuatl languages: Mēxihco), officially the United Mexican States (UMS; Spanish: Estados Unidos Mexicanos, EUM [esˈtaðos uˈniðos mexiˈkanos] lit. Mexican United 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. Covering almost 2,000,000 square kilometers (770,000 sq mi), 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 129 million people, Mexico is the tenth most populous country and the most populous Spanish-speaking country in the world, while being the second most populous nation in Latin America after Brazil. Mexico is a federation comprising 31 states plus Mexico City (CDMX), which is the capital city and its most populous city. Other metropolises in the country include Guadalajara, Monterrey, Puebla, Toluca, Tijuana, and León.
Pre-Columbian Mexico dates to about 8000 BC and is identified as one of six cradles of civilizationand 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. The Roman Catholic Church played a powerful role in governing the country as millions were converted to the faith, although King Charles III expelled the Jesuits in the 1770s. 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 loss of part of the huge 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 ended with the Mexican Revolution in 1910, which culminated in the promulgation of the 1917 Constitution and the emergence of an authoritarian one-party state,once described as the "perfect dictatorship",that ruled for much of the 20th century until the opposition victories led Mexico to democratic transition in the 1990s.
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 fifth 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.