The name was first associated with the Kaqchikel Maya capital Iximche, adopted as the Spanish capital soon after the Spanish conquest of Guatemala began in July 1524. The Kaqchikel capital was called Guatemala by the Spanish, with its origin in the Nahuatl word Quauhtemallan, which means "forested land". The Spanish took the name of the city used by their Nahuatl-speaking Mexican allies and applied it to the new Spanish city and, by extension, to the Captaincy General of Guatemala. From this comes the contemporary name of the country, Guatemala. The day of the city's foundation was 25 July, which is the feast day of St. James, hence the full name of the city.
After the Kaqchikel rebelled against their former allies, the Spanish refounded the capital as Santiago de los Caballeros de Guatemala in 1527, in the Almolonga Valley near the Volcán de Agua. In 1541 the crater of the volcano collapsed, unleashing a flood upon the new capital, which was once again moved. The Almolonga Valley site is now known as Ciudad Vieja ("Old City").
In 1543, Santiago de los Caballeros de Guatemala was once again refounded, this time at Panchoy. The new city survived as the capital of colonial Guatemala through the rest of the 16th century, the 17th century, and most of the 18th century, until it was severely damaged by the 1773 Guatemala earthquake. The capital was once again moved in 1775, although this time it was given the name Nueva Guatemala de la Asunción ("New Guatemala of the Assumption"), the present day national capital (commonly called Guatemala City). The former capital at Panchoy has now become known as Antigua Guatemala ("Old Guatemala").