Using ab initio density functional total energy and molecular dynamics simulations, we study the effects of various forms of nitrogen post deposition anneal (PDA) on the electric properties of hafnia in the context of its application as a gate dielectric in field effect transistors (FET). We consider the atomic structure and energetics of nitrogen containing defects which can be formed during the PDA in various N-based ambients: N2, N + 2 , N, NH3, NO, N2O. We analyse the role of such defects in fixed charge accumulation, electron trapping and in the growth of the interface SiO2 layer. We find that nitrogen anneal of the oxides leads to an effective immobilization of native defects such as oxygen vacancies and interstitial oxygen ions, which may inhibit growth of silica layer. Nitrogen in any form effectively incorporates into the pre-existing oxygen vacancies and, therefore may decrease the concentration of shallow electron traps. However, nitrogen in any form is unlikely to significantly reduce the fixed charge in the dielectric.