The combined roles of oxygen vacancy and electron doping in mediating local and nonlocal magnetic ordering of Fe doped in In 2 O 3 and Co doped in ZnO have been investigated within first-principles density functional theory. We first show theoretically that two magnetic dopants can be stabilized energetically around an oxygen vacancy, and are ferromagnetically coupled to form a local magnetic polaron.Furthermore, electron doping plays the elegant dual role of further enhancing the ferromagnetic stability of a local polaron, and more crucially, mediating the nonlocal 2 magnetic coupling between two polarons. We finally provide experimental evidence supporting these strong predictions.