These authors contributed equally: Tingxin Li, Shengwei Jiang.Stacking order can significantly influence the physical properties of two-dimensional (2D) van der Waals materials 1 . The recent isolation of atomically thin magnetic materials 2-22 opens the door for control and design of magnetism via stacking order. Here we apply hydrostatic pressure up to 2 GPa to modify the stacking order in a prototype van der Waals magnetic insulator CrI3. We observe an irreversible interlayer antiferromagnetic (AF) to ferromagnetic (FM) transition in atomically thin CrI3 by magnetic circular dichroism and electron tunneling measurements. The effect is accompanied by a monoclinic to a rhombohedral stacking order change characterized by polarized Raman spectroscopy. Before the structural change, the interlayer AF coupling energy can be tuned up by nearly 100% by pressure. Our experiment reveals interlayer FM coupling, which is the established ground state in bulk CrI3, but never observed in native exfoliated thin films. The observed correlation between the magnetic ground state and the stacking order is in good agreement with first principles calculations 23-27 and suggests a route towards nanoscale magnetic textures by moiré engineering 28 .Intrinsic magnetism in 2D van der Waals materials has received growing attention 2-22 . Of particular interest is the thickness-dependent magnetic ground state in atomically thin CrI3. In these exfoliated thin films, the magnetic moments are aligned (in the out-of-plane direction) in each layer, but anti-aligned in adjacent layers 3,12-22 . They are FM (or AF) depending on whether there is (or isn't) an uncompensated layer. The relatively weak interlayer coupling compared to the intralayer coupling allows effective ways to control the interlayer magnetism, which have led to interesting spintronics applications including voltage switching 12-14 , spin filtering 16-20 and spin transistors 21 . The origin of interlayer AF coupling is, however, not well understood since interlayer FM order is the ground state in the bulk crystals. Recent ab initio calculations 23-27 and experiments 22,29,30 have suggested that stacking order could provide an explanation but a direct correlation between stacking order and interlayer magnetism is lacking.In bulk CrI3, the Cr atoms in each layer form a honeycomb structure, and each Cr atom is surrounded by six I atoms in an octahedral coordination (Fig. 1a). The bulk crystals undergo a structural phase transition from a monoclinic phase (space group C2/m) at room temperature to a