The Large Area Telescope on board the Fermi satellite observed a gamma-ray flare in the Crab nebula lasting for approximately nine days in April of 2011. The source, which at optical wavelengths has a size of ~11 ly across, doubled its gamma-ray flux within eight hours. The peak photon flux was (186 +- 6) 10-7 cm-2 s-1 above 100 MeV, which corresponds to a 30-fold increase compared to the average value. During the flare, a new component emerged in the spectral energy distribution, which peaked at an energy of (375 +- 26) MeV at flare maximum. The observations imply that the emission region was likely relativistically beamed toward us and that variations in its motion are responsible for the observed spectral variability.