We report the results of a combined muon-spin rotation and neutron-scattering study on La2-xSrxCuO4 in the vicinity of the so-called 1/8 anomaly. Application of a magnetic field drives the system toward a magnetically ordered spin-density-wave state, which is fully developed at 1/8 doping. The results are discussed in terms of competition between antiferromagnetic and superconducting order parameters.