The Aztecs originated in northern Mexico in the early 13th century and established their capital city of Tenochtitlan in 1325. Under the leadership of Itzcoatl in the 15th century, the Aztecs formed alliances that allowed them to defeat rivals and establish the Aztec Empire, collecting taxes from 371 tribes. The Aztec Empire was highly structured society with a strict caste system and complex religion and mythology centered around temples in Tenochtitlan. However, in 1521 the Aztec empire was conquered by the Spanish conquistador Hernan Cortes.