Mexico was colonized by the Spanish. The armies of Spanish conquistador Hernan Cortes defeated the Aztecs on Aug. 13, 1521. The conquest of the Yucatan was a much longer campaign, lasting from 1551 to 1697.
Cortes arrived on the Mexican shore and founded the Spanish city of Veracruz on April 22, 1519. From there, he and his army headed inland toward the renowned Aztec capital of Tenochtitlan, where they arrived in late 1519. Initially greeted with gifts by the Aztec emperor Moctezuma, Cortes and his men made camp in the capital city. When Cortes was called away to meet with royal envoys from Spain, his men became frightened of an attack from the Aztecs and conducted a massacre at Templo Mayor.
When Cortes returned, Moctezuma met with him in the hopes of avoiding a full-scale war. The Aztec emperor was then stoned to death by his own people. The new emperor of the Aztecs, Cuitlahuac, drove the Spanish out of Tenochtitlan. However, Cortes then made allies of the Kingdom of Tlaxcala, amassed a large number of volunteer troops, attacked Tenochtitlan by water, and put the city under siege.
Ravaged by disease unwittingly spread by the European invaders and without access to clean water or food, the Aztecs eventually surrendered. Spain renamed the land the Viceroyalty of New Spain and remained as the sovereign ruler for the next 300 years. During this time they expanded their domain to include the Yucatan and the lands of Central Mexico.