Structural, electronic and dynamical properties of the rocksalt structure of the nitride materials ScN and GaN have been studied by employing an ab initio pseudopotential method and a linear response scheme, within the generalized gradient approximation. The calculated lattice constant, bulk modulus, pressure derivative of bulk modulus, and the direct band gaps for ScN are in agreement with the previous ab initio calculations and available experimental results. For the rocksalt GaN, we have observed that this material is characterized by an indirect band gap with minimum of the conduction band lying at the X point. Our results for the zone-centre frequencies are in reasonable agreement with experimentally determined values obtained from Raman spectroscopy. The phonon dispersion curves for the two materials are compared and contrasted. (c) 2005 Elsevier B.V. All rights reserved.