We have used first-principles calculations to investigate the mixing enthalpies, lattice parameters and electronic density of states of the ternary nitride systems Ti1-xAlxN, Cr1-xAlxN, Sc1-xAlxN and Hf1-xAlxN in the cubic B1 structure where the transition metals and aluminium form a solid solution on the metal sublattice. We discuss the electronic origins of the possible isostructural decomposition in these materials relevant for hard coatings applications. We find that in the systems Ti1-xAlxN and Hf1-xAlxN the electronic structure effects strongly influences the phase stability as d-states are localised at the Fermi level in AlN-rich samples. This leads to a strongly asymmetric contribution to the mixing enthalpy, an effect not present in Cr1-xAlxN and Sc1-xAlxN. The lattice mismatch is large in Sc1-xAlxN and Hf1-xAlxN, giving a symmetric contribution to the mixing enthalpies in those systems. (C) 2008 Elsevier B.V. All rights reserved.