  We have performed a systematic calculation for the non-Markovian dynamics of
a localized electron spin interacting with an environment of nuclear spins via
the Fermi contact hyperfine interaction. This work applies to an electron in
the s -type orbital ground state of a quantum dot or bound to a donor impurity,
and is valid for arbitrary polarization p of the nuclear spin system, and
arbitrary nuclear spin I in high magnetic fields. In the limit of p=1 and
I=1/2, the Born approximation of our perturbative theory recovers the exact
electron spin dynamics. We have found the form of the generalized master
equation (GME) for the longitudinal and transverse components of the electron
spin to all orders in the electron spin--nuclear spin flip-flop terms. Our
perturbative expansion is regular, unlike standard time-dependent perturbation
theory, and can be carried-out to higher orders. We show this explicitly with a
fourth-order calculation of the longitudinal spin dynamics. In zero magnetic
field, the fraction of the electron spin that decays is bounded by the
smallness parameter \delta=1/p^{2}N, where N is the number of nuclear spins
within the extent of the electron wave function. However, the form of the decay
can only be determined in a high magnetic field, much larger than the maximum
Overhauser field. In general the electron spin shows rich dynamics, described
by a sum of contributions with non-exponential decay, exponential decay, and
undamped oscillations. There is an abrupt crossover in the electron spin
asymptotics at a critical dimensionality and shape of the electron envelope
wave function. We propose a scheme that could be used to measure the
non-Markovian dynamics using a standard spin-echo technique, even when the
fraction that undergoes non-Markovian dynamics is small.
