The Mexica or Aztec people were told by an oracle to build their city where they saw an eagle (the god Huitzilopochtli) eating a snake on a cactus. In 1325 they saw this in a swamp, and there they built Tenochtitlán. When Cortés defeated the Aztecs in 1521 he razed their capital, and Mexico City arose in its place.

The swamp was turned into canals, irrigation, and arable fields, approached over Lake Texcoco on four great defensible causeways. It was a gigantic city, with a population in the hundreds of thousands, possibly the largest city in the world; divided into four quarters, each with its great temple. In the centre was the supreme Templo Mayor, on which site the Cathedral now stands.

It was apparently rebuilt in 1428 with conscious homage to the ancient cities of Teotihuacán and Tula.