The massive flare of 27 December 2004 from the soft γ-ray repeater SGR 1806-20, a possible magnetar, saturated almost all γ-ray detectors, meaning that the profile of the pulse was poorly characterized. An accurate profile is essential to determine physically what was happening at the source. Here we report the unsaturated γ-ray profile for the first 600 ms of the flare, with a time resolution of 5.48 ms. The peak of the profile (of the order of 107 photons cm-2s-1) was reached ∼50 ms after the onset of the flare, and was then followed by a gradual decrease with superposed oscillatory modulations possibly representing repeated energy injections with ∼60-ms intervals. The implied total energy is comparable to the stored magnetic energy in a magnetar (∼1047 erg) based on the dipole magnetic field intensity (∼1015 G), suggesting either that the energy release mechanism was extremely efficient or that the interior magnetic field is much stronger than the external dipole field.