  Stacking order can significantly influence the physical properties of
two-dimensional (2D) van der Waals materials. The recent isolation of
atomically thin magnetic materials 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 and suggests a route towards nanoscale magnetic
textures by moir\'e engineering.
