  Erbium-doped solids are prime candidates for optical quantum communication
networks due to erbium's telecom C-band emission. A long-lived electron spin of
erbium with millisecond coherence time is highly desirable for establishing
entanglement between adjacent quantum repeater nodes while long-term storage of
the entanglement could rely on transferring to erbium's second-long coherence
nuclear spins. Here we report GHz-range electron spin transitions of
$^{167}\mathrm{Er}^{3+}$ in yttrium oxide ($\mathrm{Y_2O_3}$) matrix with
coherence times that are consistently longer than a millisecond. Instead of
addressing field-specific Zero First-Order Zeeman transitions, we probe weakly
mixed electron spins with the field orientation along the lower g-factors.
Using pulsed electron spin resonance spectroscopy, we find paramagnetic
impurities are the dominant source of decoherence, and by polarizing them we
achieve a Hahn echo spin $\mathrm{T_2}$ up to 1.46 ms, and a coherence time up
to 7.1 ms after dynamical decoupling. These coherence lifetimes are among the
longest found in crystalline hosts especially those with nuclear spins. We
further enhance the coherence time beyond conventional dynamical decoupling,
using customized sequences to simultaneously mitigate spectral diffusion and
Er-Er dipolar interactions. Despite nuclear and impurity spins in the host,
this work shows that long-lived erbium spins comparable to non-nuclear spin
hosts can be achieved. Our study not only establishes $^{167}\mathrm{Er}^{3+}$:
$\mathrm{Y_2 O_3}$ as a significantly promising quantum memory platform but
also provides a general guideline for engineering long-lived erbium spins in a
variety of host materials for quantum technologies.
