Two-dimensional systems, such as ultrathin epitaxial films and superlattices, display magnetic properties distinct from bulk materials. A challenging aim of current research in magnetism is to explore structures of still lower dimensionality. As the dimensionality of a physical system is reduced, magnetic ordering tends to decrease as fluctuations become relatively more important. Spin lattice models predict that an infinite one-dimensional linear chain with short-range magnetic interactions spontaneously breaks up into segments with different orientation of the magnetization, thereby prohibiting long-range ferromagnetic order at a finite temperature. These models, however, do not take into account kinetic barriers to reaching equilibrium or interactions with the substrates that support the one-dimensional nanostructures. Here we demonstrate the existence of both short- and long-range ferromagnetic order for one-dimensional monatomic chains of Co constructed on a Pt substrate. We find evidence that the monatomic chains consist of thermally fluctuating segments of ferromagnetically coupled atoms which, below a threshold temperature, evolve into a ferromagnetic long-range-ordered state owing to the presence of anisotropy barriers. The Co chains are characterized by large localized orbital moments and correspondingly large magnetic anisotropy energies compared to two-dimensional films and bulk Co.