During the Spanish campaign, Cortés allied with a number of the tributaries and rivals of the Aztecs, including the Totonacs, and the Tlaxcaltecas. After eight months of battles and intrigue, which overcame the diplomatic resistance of the Aztec Emperor Montezuma to his visit, Cortés arrived in Tenochtitlan on November 8, 1519, where he took up residence. After an Aztec attack on Nauhtlan, a city on the coast, that left several Spaniards dead, Cortés took Montezuma captive in his own palace and ruled through him for months. After the massacre at the Main Temple of Tenochtitlan and a rebellion by the population of the city, Cortés and his men had to fight their way out of the capital city during the Noche Triste in June, 1520. However, the Spanish and Tlaxcalans would return with reinforcements and a siege plan that led to the fall of Tenochtitlan a year later.
The collapse of the Aztec Empire was a major milestone in the formation of New Spain, which would not be formalized by the Spanish Crown un