Two isomorphous 3D metal phosphonates, [M2(H2L)] (M = Zn (1), Co (2); H6L = 1,4-((H2O3PCH2)(HOOCCH2)NCH2)2 C6H4, are reported; Solid 1 is stable up to 300 °C under an air atmosphere, displays bright tunable luminescence and offers reversible sensing of nitrobenzene.