The present invention provides hydroxypyridinone and hydroxypyrimidone chelating agents. Also provides are Gd(III) complexes of these agents, which are useful as contrast enhancing agents for magnetic resonance imaging. The invention also provides methods of preparing the compounds of the invention, as well as methods of using the compounds in magnetic resonance imaging applications.