  Using density functional theory, we study the magnetic stability of the
Ga$_{1-x}$Mn$_x$N alloy system. We show that unlike Ga$_{1-x}$Mn$_x$As, which
shows only ferromagnetic (FM) phase, Ga$_{1-x}$Mn$_x$N can be stable in either
FM or antiferromagnetic phases depending on the alloy concentration. The
magnetic order can also be altered by applying pressure or with charge
compensation. A unified model is used to explain these behaviors.
