We report the study of high-pressure phases of YN and ScN compounds, using a recent version of the full potential linear muffin-tin orbital (FPLMTO) method, which enables an accurate treatment of the interstitial regions. The local density approximation (LDA) was used for the exchange and correlation energy density functional. Calculations are given for lattice parameters, bulk modulus and its first derivatives in different structures. Under compression, we found that ScN transforms from NaCl-type structure (B1) to Beta-Sn-type (A5) at a pressure of around 301.3 GPa, with a direct energy gap at Γ of about 0.108 eV. This transition B1 to A5 takes place at a lower pressure than the well-known transition NaCl-type structure (B1) to CsCl-type structure (B2) (found here to be 412 GPa). Our calculations also show that YN transforms from B1 to B2 at a pressure of around 198.5 GPa.