What enabled the Spanish to defeat the Aztecs?

What enabled the Spanish to defeat the Aztecs?