In this proposal we will study the average and local structure changes in Li-N-D imide-amides formed as intermediates during the ammoniation of Li3N and deammoniation of LiND2. The study will be performed by means of high resolution neutron diffraction and neutron total scattering coupled to pair distribution function analysis. We expect to deliver a model of the local structure of Li-N-D intermediate phase as a function of the (de)ammoniation parameters and in particular elucidate the arrangement of hydrogen (deuterium) atoms. Data points as a function of composition will allow to probe the evolution of the local (and average) structure as a function of ND3 uptake in the phases thus possibly helping us in defining and elucidating the reaction mechanism in such a system