The discrete variational method is used to calculate the electronic structure of the clusters such as Zr 9 Ni 4 and Zr 10 Cu 5 in the primary devitrification phases such as fcc–Zr 2 Ni and bct–Zr 2 Cu in Zr-based amorphous alloys. In order to reveal the effect of Al on the stability of these clusters, Al atoms are introduced to replace Ni or Cu. The calculated density of states curves show that the Zr 9 Ni 3 Al cluster is more stable than Zr 9 Ni 4 but the stability deteriorates with more Al substitutions. For the Zr 10 Cu 5 cluster, one Al stabilizes this cluster but more Al substitutions destabilize it because more electrons are activated towards high energy levels. This stability mechanism explains the superior stability of the Zr–Al–Ni and Zr–Al–Cu amorphous alloys with respect to the binary Zr–Cu and Zr–Ni amorphous alloys.