  We demonstrate a coherence time of 2.1(1)~s for electron spin superposition
states of a single trapped $^{40}$Ca$^+$ ion. The coherence time, measured with
a spin-echo experiment, corresponds to residual rms magnetic field fluctuations
$\leq$~2.7$\times$10$^{-12}$~T. The suppression of decoherence induced by
fluctuating magnetic fields is achieved by combining a two-layer $\mu$-metal
shield, which reduces external magnetic noise by 20 to 30~dB for frequencies of
50~Hz to 100~kHz, with Sm$_2$Co$_{17}$ permanent magnets for generating a
quantizing magnetic field of 0.37~mT. Our results extend the coherence time of
the simple-to-operate spin qubit to ultralong coherence times which so far have
been observed only for magnetic insensitive transitions in atomic qubits with
hyperfine structure.
