In June, 9, 1520 hostilities broke out, culminating in the massacre in the Main Temple and the death of Moctezuma. The Spaniards fled the town on July 1, 1520, an episode later characterized as La Noche Triste. They and their native allies returned in the spring of 1521 to lay siege to Tenochtitlan. However, the Aztecs, under the leadership of the new emperor Cuitláhuac, successfully defeated the Spanish at the battle at the gates of Tenochtitlan in 1521. After the first Aztec Spanish War the Aztecs suffered greatly from Spanish-introduced diseases, primarily smallpox. Eventually the Aztecs became immune to the disease, but only after 35% of the population had been wiped out. Despite all the human sacrifices, the priests could not stop the plague which led to a series of protests, and in the end, a massacre of all priests by the enraged population. This ended the priests’ power once and for all. Once the Aztecs had shaken off the effects of the plagues, they began an intense period of modernization, realizing that they needed to modernize if the Spanish ever returned. After the massacres of priests during the plague, the Aztecs heavily reformed their religion, removing human sacrifice and cannibalism from it, so no more religious riots could take place, and the nations of Europe could not use religion as a pretext for invasion. At the same time, the Aztecs began learning how to build Spanish weapons and learn Spanish tactics for war. Saltpetre was in short supply though, as was metal, so traders from Britain and France traded weapons for gold. They also taught the Aztecs how to mine and smelt metal, and manufacture metal weapons and armour. Supplied with advanced weapons, the Aztecs went to war with, and defeated, the Confederacy of Tlaxcala. After the war, the Aztecs did not mass murder their prisoners of war, instead sending, them to work at the metal mines. All this was meant not to aggravate the European nations from going to war, a war which the Aztecs knew they would lose.