Uxmal was the greatest metropolitan and religious center in the Puuc hills of Yucatan during the late Classical period, flourishing between the 7th and 10th centuries AD. Uxmal translates as 'thrice built' and, whatever the actual number, the numerous building phases are reflected in a variety of architectural styles. The city was abandoned in the 10th century after apparently coming under Toltec influence. The currently used names for many of the structures were coined by the conquering Spanish and are neither indigenous nor do they indicate the actual functions of the buildings. An example is the Nunnery so named for its similarity to the convents of the Spaniards. This structure was actually used as a school for the training of healers, astronomers, mathematicians, shamans and priests.
The Pyramid of the Magician, at 100 feet the tallest structure in Uxmal, is more accurately named. According to ancient legends, a magician-god named Itzamna single handedly constructed the pyramid in one night. From archaeological excavation, however, we know that the pyramid was constructed in five superimposed phases. The legendary association of the pyramid with a magician may be understood as an indication that the structure, and indeed the entire sacred part of the Uxmal complex, had ancient and ongoing use as a mystery school and ceremonial center. It is also interesting to note that the entire city is aligned with reference to the position of the planets then known, with Venus predominating, and that the pyramid of the magician is oriented so that its stairway on the west faces the setting sun at the time of summer solstice.