Mexico, officially the United Mexican States, is a country in North America. It is the northernmost country in Latin America, and borders the United States to the north, and Guatemala and Belize to the southeast; while having maritime boundaries with the Pacific Ocean to the west, the Caribbean Sea to the southeast, and the Gulf of Mexico to the east. Mexico covers 1,972,550 km2 (761,610 sq mi), and is the thirteenth-largest country in the world by land area. With a population exceeding 130 million, Mexico is the tenth-most populous country in the world and is home to the largest number of native Spanish speakers. Mexico City is the capital and largest city, which ranks among the most populous metropolitan areas in the world.
Human presence in Mexico dates back to at least 8,000 BC. Mesoamerica, considered a cradle of civilization, was home to numerous advanced societies, including the Olmecs, Maya, Zapotecs, Teotihuacan civilization, and Purépecha. Spanish colonization began in 1521 with an alliance that defeated the Aztec Empire, establishing the colony of New Spain with its capital at Tenochtitlan (now Mexico City). New Spain became a major center of the transoceanic economy during the Age of Discovery, fueled by silver mining and its position as a hub between Europe and Asia. This gave rise to one of the largest multiracial populations in the world. The Peninsular War led to the 1810–1821 Mexican War of Independence, which ended Peninsular rule and led to the creation of the First Mexican Empire, which quickly collapsed into the short-lived First Mexican Republic.