The electronic structure and relative stability of icosahedral Al12M (M=transition metal) clusters have been studied using the density functional theory within the local spin density approximation. Our calculations predict large binding energies for clusters with M atom in the middle of a d series in agreement with the occurrence of Al12W phase in these alloys and provide an insight into the understanding of the stability of AlM quasicrystals. {\textcopyright} 1994 The American Physical Society.