The phase stability of hexagonal WC-structure and cubic NaCl-structure 4𝑑4d transition metal nitrides was calculated using first-principles density functional theory. It is predicted that there is a multiphase or polytypic region for the 4𝑑4d transition metal nitrides with a valence electron concentration around 9.5 to 9.7 per formula unit. For verification, epitaxial Nb𝑥Zr1−𝑥NNbxZr1−xN (0⩽𝑥⩽1)(0⩽x⩽1) was grown by reactive magnetron sputter deposition on MgO(001) substrates and analyzed with transmission electron microscopy (TEM) and x-ray diffraction. The defects observed in the films were threading dislocations due to nucleation and growth on the lattice-mismatched substrate and planar defects (stacking faults) parallel to the substrate surface. The highest defect density was found at the 𝑥=0.5x=0.5 composition. The nanoindentation hardness of the films varied between 21GPa21GPa for the binary nitrides, and 26GPa26GPa for Nb0.5Zr0.5NNb0.5Zr0.5N. Unlike the cubic binary nitrides, no slip on the preferred ⟨11¯0⟩{110}⟨11¯0⟩{110} slip system was observed. The increase in hardness is attributed to the increase in defect density at 𝑥=0.5x=0.5, as the defects act as obstacles for dislocation glide during deformation. The findings present routes for the design of wear-resistant nitride coatings by phase stability tuning.The authors acknowledge support from the Swedish Research Council (VR) and the Foundation for Strategic Research (SSF) Materials Research program on Low-temperature Thin Film synthesis. Jörg Neidhardt is acknowledged for assistance with the hardness measurements.