Aztec emperor Moctezuma Xocoyotzin imposed a new governor, Omácatl, onto Xochimilco due to the arrival of the Spanish, but this governor was forced to return to Tenochtitlan, when the emperor was taken prisoner. He was then succeeded by Macuilxochitecuhtli, but eighty days later he too went to Tenochtitlan to fight the Spanish alongside Cuitláhuac. He was followed by Apochquiyautzin, who remained loyal to Tenochtitlan. For this reason, Hernán Cortés decided to send armies to subdue Xochimilco before taking Tenochtitlan. This occurred on 16 April 1521. During the battle, Cortés was almost killed when he fell off his horse, but he was saved by a soldier named Cristóbal de Olea. The battle was fierce and left few Xochimilca warriors alive. The invaders later raped and pillaged the city. According to legend, it was after this battle that Cuauhtémoc came to Xochimilco and planted a juniper tree in the San Juan neighborhood to commemorate the event.