The local structures of the two trigonal Er 3+ ( 167 Er) centers I and II in KMgF 3 are theoretically studied using the perturbation formulas of the g factors for a 4f 11 ion in trigonal symmetry. In these formulas the contributions to the g factors from the second-order perturbation terms and admixtures of various states are taken into account. Based on the studies, the centers I and II are attributed to, respectively, the Er