A Gd complex based on a polyphosphonated pyridyl ligand shows a very high stability in aqueous solution (logK EuL = 25.7), a high relaxivity (8.5 mM -1 s -1 at 25 °C and 20 MHz) and a marked and selective relaxivity enhancement (37%) in the presence of Mg 2+, opening interesting perspectives for the design of cation responsive contrast agents. © 2012 The Royal Society of Chemistry.