Self-assembling of 1O4Mg tetrahedral clusters in ZnTe isoelectronically co-doped with Mg and oxygen in the ultra dilute oxygen impurity limit is described by a phase diagram. The occurrence of 1O4Mg clusters is a result of the second-order transition. The final stage of self-assembling when all oxygen impurities are in 1O4Mg clusters has to be reached also as a result of the second-order transition at the temperature close to the temperature of the occurrence of these clusters. The conditions of these phase transitions are obtained.