This is an extended Tersoff potential for boron nitride (BN-ExTeP) for application in large scale atomistic simulations. It accurately describes the main low energy B, N, and BN structures and yields quantitatively correct trends in the bonding as a function of coordination. The proposed extension of the bond order, added to improve the dependence of bonding on the chemical environment, leads to an accurate description of point defects in hexagonal BN (h-BN) and cubic BN (c-BN).