A combined X-ray crystallography and theoretical study of N-H...OX (X is =P and -C) hydrogen bonds in two new structures with a (C-O)2(N)P(=Y) (Y is O and S) skeleton.