By studying the magnetic behavior of self-assembled Co islands on a single-crystal metal surface, Pt(111), we show how the magnetic anisotropy evolves from isolated atoms to monolayer islands and films. Single Co adatoms are found to have a giant magnetocrystalline anisotropy energy of E-a = 9.3 +/- 1.6 meV/atom arising from the combination of partly preserved orbital moments (m(L) = 1.1 mu(B)) and strong spin-orbit coupling induced by the Pt substrate. Combined scanning tunneling microscopy and X-ray magnetic circular dichroism experiments performed for differently sized small two-dimensional Co islands establish a clear connection between E-a and m(L), both quantities decrease sharply with the lateral coordination of the magnetic atoms. In accordance with this, Kerr magnetometry experiments, again performed in conjunction with scanning tunneling microscopy, reveal that the anisotropy energy of large two-dimensional Co islands is almost entirely determined by the relatively low number of perimeter atoms, having E-a = 0.9 +/- 0.1 meV/atom. These results confirm theoretical predictions and are of fundamental value the understanding of how the magnetic anisotropy develops in finite-size magnetic particles. Identification of the role of perimeter and surface atoms opens up new opportunities for engineering the anisotropy and the moment of a magnetic nanostructure. (C) 2004 Academie des sciences. Published by Elsevier SAS. All rights reserved.