The microscopic structure of Mg-H complexes in GaN has been a subject of intense theoretical and experimental investigation. In order to probe the Mg-H structure, we have studied the effect of hydrostatic pressure on the local vibrational mode (LVM) frequency. At ambient pressure, the LVM frequency is 3125 cm -1 , which corresponds to a N-H stretching mode. In this study, Fourier-transform spectroscopy was performed on free-standing GaN:Mg,H samples in a diamond-anvil cell, with nitrogen as a pressure-transmitting fluid. The samples had been removed from their sapphire substrate by the laser-liftoff technique. The LVM frequency was measured, at liquid helium temperatures, for pressures ranging from 0 to 5 GPa. The pressure dependence of the frequency is nonlinear: first it decreases with pressure, then it increases. Comparison with first-principles calculations allows us to derive information about the microscopic structure of the Mg-H complex. The calculated stable configuration indeed gives rise to a frequency shift consistent with experiment. Based on the comparison between theory and experiment, we can exclude the bond-center configuration, which would result in a much larger pressure derivative than experimentally observed.