A study of the structure and the bonding nature of Mg clusters having 2 to 13 atoms has been made using the density functional molecular dynamics method within the local density approximation. The calculated lowest energy structures can be described in terms of a tetrahedron and a trigonal prism. Mg4 and Mg10 are magic clusters and Mg13 is neither an icosahedron nor a cuboctahedron. The bonding nature varies from atom to atom in a cluster and the transition from weakly bonded dimer to bulk like metallic behaviour is oscillatory and slow. {\textcopyright} 1991 Springer-Verlag.