Soft γ-ray repeaters (SGRs) are 'magnetars', a small class of slowly spinning neutron stars with extreme surface magnetic fields, B ≈ 10 15 gauss (refs 1-3). On 27 December 2004, a giant flare was detected from the magnetar SGR 1806-20 (ref. 2), only the third such event recorded. This burst of energy was detected by a variety of instruments and even caused an ionospheric disturbance in the Earth's upper atmosphere that was recorded around the globe. Here we report the detection of a fading radio afterglow produced by this outburst, with a luminosity 500 times larger than the only other detection of a similar source. From day 6 to day 19 after the flare from SGR 1806-20, a resolved, linearly polarized, radio nebula was seen, expanding at approximately a quarter of the speed of light. To create this nebula, at least 4 × 10 43 ergs of energy must have been emitted by the giant flare in the form of magnetic fields and relativistic particles.