We present a microscopic study of nematicity and magnetism in FeSe over a wide temperature and pressure range using high-energy x-ray diffraction and time-domain Mössbauer spectroscopy. The low-temperature magnetic hyperfine field increases monotonically up to ∼6 GPa. The orthorhombic distortion initially decreases under increasing pressure but is stabilized at intermediate pressures by cooperative coupling to the pressure-induced magnetic order. Close to the reported maximum of the superconducting critical temperature at p=6.8GPa, the orthorhombic distortion suddenly disappears and a new tetragonal magnetic phase occurs. The pressure and temperature evolution of the structural and magnetic order parameters suggests that they have distinct origins.