Atomically sharp oxide heterostructures often exhibit unusual physical properties that are absent in the constituent bulk materials. The interplay between electrostatic boundary conditions, strain and dimensionality in ultrathin epitaxial films can result in monolayer-scale transitions in electronic or magnetic properties. Here we report an atomically sharp antiferromagnetic-to-ferromagnetic phase transition when atomically growing polar antiferromagnetic LaMnO3 (001) films on SrTiO3 substrates. For a thickness of five unit cells or less, the films are antiferromagnetic, but for six unit cells or more, the LaMnO3 film undergoes a phase transition to a ferromagnetic state over its entire area, which is visualized by scanning superconducting quantum interference device microscopy. The transition is explained in terms of electronic reconstruction originating from the polar nature of the LaMnO3 (001) films. Our results demonstrate how new emergent functionalities can be visualized and engineered in atomically thick oxide films at the atomic level.