Claim: Mexico went to war with France in the 19th century.

Mexico -LRB- México , -LSB- ˈme.xi.ko -RSB- , modern Nahuatl -RRB- , officially the United Mexican States -LRB- -LSB- Estados Unidos Mexicanos , links = no -RSB- , -RRB- , is a federal republic 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 two million square kilometers -LRB- over 760,000 sq mi -RRB- , Mexico is the sixth largest country in the Americas by total area and the 13th largest independent nation in the world . With an estimated population of over 120 million , it is the eleventh most populous country and the most populous Spanish-speaking country in the world while being the second most populous country in Latin America . Mexico is a federation comprising 31 states and a federal district that is also its capital and most populous city . Other metropolises include Guadalajara , Monterrey , Puebla , Toluca , Tijuana and León .   Pre-Columbian Mexico 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 base in Mexico-Tenochtitlan , which was administered as the viceroyalty of New Spain . Three centuries later , this territory became Mexico following recognition in 1821 after the colony 's Mexican War of Independence . The tumultuous post-independence period was characterized by economic instability and many political changes . The Mexican -- American War -LRB- 1846 -- 48 -RRB- led to the territorial cession of the extensive northern territories to the United States . The Pastry War , the Franco-Mexican War , a civil war , two empires and a domestic dictatorship occurred through the 19th century . The dictatorship was overthrown in the Mexican Revolution of 1910 , which culminated with the promulgation of the 1917 Constitution and the emergence of the country 's current political system .   Mexico has the fifteenth largest nominal GDP and the eleventh largest by purchasing power parity . The Mexican economy is strongly linked to those of its North American Free Trade Agreement -LRB- NAFTA -RRB- partners , especially the United States . Mexico was the first Latin American member of the Organisation for Economic Co-operation and Development -LRB- OECD -RRB- , joining in 1994 . It is classified as an upper-middle income country by the World Bank and a newly industrialized country by several analysts . By 2050 , Mexico could become the world 's fifth or seventh largest economy . The country is considered both a regional power and 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 by number of UNESCO World Heritage Sites . Mexico is a megadiverse country , ranking fourth in the world by biodiversity . In 2016 it was the eighth most visited country in the world , with 35 million international arrivals . Mexico is a member of the United Nations , the World Trade Organization , the G8 +5 , the G20 , the Uniting for Consensus and the Pacific Alliance .