In Sr 2 NiIrO 6 long-range Ir-Ir antiferromagnetic exchange interactions have been reported to overcome the ferromagnetic Ni-Ir interactions hampering the otherwise expected ferromagnetic behavior. Prompted by this, a combination of x-ray absorption spectroscopy and x-ray diffraction at high pressure is used here to investigate the interplay between the magnetic structure of the Ir sublattice and lattice degrees of freedom. The compression of Sr 2 NiIrO 6 drives an unexpected nonmonotonic change of the x-ray magnetic circular dichroism (XMCD) spectra: The intensity first decreases in the 0-to 18-GPa range, then shows an increase in the 18-to 30-GPa range and again decreases for higher pressures. The XMCD intensity, a measure of the net magnetization in the Ir sublattice, however, is found to remain very low in the whole pressure range so the observed changes do not correspond with a transition from antiferromagnetic to ferromagnetic or ferrimagnetic order. The evolution of the XMCD is better explained in terms of a weakening/strengthening of the long-range antiferromagnetic (AFM) Ir-Ir interaction between ferromagnetic planes associated with the reduction of the lattice parameters. In particular, a correlation can be established between the evolution of the b/a ratio and the weakening/strengthening of the AFM interaction.