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.