Particle acceleration in the dynamic magnetotail