The history of Mexico, a country in the southern portion of North America, covers a period of more than three millennia. First populated more than 13,000 years ago, the territory had complex indigenous civilizations before being conquered and colonized by the Spanish in the 16th century. One of the important aspects of Mesoamerican civilizations was their development of a form of writing, so that Mexico's written history stretches back hundreds of years before the arrival of the Spaniards in 1519. This era before the arrival of Europeans is called variously the prehispanic era or the precolumbian era.The Aztec capital of Tenochtitlan became the Spanish capital Mexico City, which was and remains the most populous city in Mexico.From 1521, the Spanish conquest of the Aztec empire incorporated the region into the Spanish Empire, with New Spain its colonial era name and Mexico City the center of colonial rule. It was built on the ruins of the Aztec capital of Tenochtitlan and became the capital of New Spain. During the colonial era, Mexico's long-established Mesoamerican civilizations mixed with European culture. Perhaps nothing better represents this hybrid background than Mexico's languages: the country is both the most populous Spanish-speaking country in the world and home to the largest number of Native American language speakers in North America. For three centuries Mexico was part of the Spanish Empire, whose legacy is a country with a Spanish-speaking, Catholic and largely Western culture.
this website is https://en.wikipedia.org/wiki/History_of_Mexico