Mexico is a country in North America an the largest Spanish-speaking country in the world. It also has the largest number of American Indian language speakers on the continent (the majority speaking Nahuatl, Mayan, Mixtec and Zapotec). Human presence in Mexico has been shown to date back 40,000 years based upon ancient human footprints discovered in the Valley of Mexico (previous evidence substantiated indigenous inhabitants at 12,500 years ago). For thousands of years, Mexico was a land of hunter-gatherers. Around 9,000 years ago, ancient Mexicans domesticated corn and initiated an agricultural revolution, leading to the formation of many complex civilizations. These civilizations revolved around cities with writing, monumental architecture, astronomical studies, mathematics, and militaries. After 4,000 years, these civilizations were destroyed with the arrival of the Spaniards in 1519. For three centuries, Mexico was colonized by Spain, during which time the majority of its indigenous population died off. Formal independence from Spain was recognized in 1821. A war with the United States ended with Mexico losing almost half of its territory in 1848. France then invaded Mexico in 1864 and ruled briefly until 1867. The Mexican Revolution would later result in the death of 10% of the nation's population. Since then, Mexico as a nation-state has struggled with reconciling its deeply-entrenched indigenous heritage with the demands of the modern Western cultural model imposed in 1519. The nation's name is derived from the Mexican civilization (known in popular culture as the Aztecs).