A systematic study of the growth process of LaMnO 3 (LMO) thin films, by pulsed laser deposition, on top of SrTiO 3 substrates under different oxygen partial pressures (PO 2) is reported. It is found that the accommodation of the orthorhombic LMO phase onto the cubic STO structure, i.e. the amount of structural strain, is controlled by background oxygen pressure. We demonstrate that magnetic behaviour can be continuously tuned from robust ferromagnetic (FM) ordering to an antiferromagnet. These results strongly point to a strain-induced selective orbital occupancy as the origin of the observed FM behaviour, in agreement with recent theoretical calculations.