Soft gamma repeaters are high-energy transient sources associated with neutron stars in young supernova remnants. They emit sporadic, short (~ 0.1 s) bursts with soft energy spectra during periods of intense activity. The event of March 5, 1979 was the most intense and the only clearly periodic one to date. Here we report on an even more intense burst on August 27, 1998, from a different soft gamma repeater, which displayed a hard energy spectrum at its peak, and was followed by a ~300 s long tail with a soft energy spectrum and a dramatic 5.16 s period. Its peak and time integrated energy fluxes at Earth are the largest yet observed from any cosmic source. This event was probably initiated by a massive disruption of the neutron star crust, followed by an outflow of energetic particles rotating with the period of the star. Comparison of these two bursts supports the idea that magnetic energy plays an important role, and that such giant flares, while rare, are not unique, and may occur at any time in the neutron stars activity cycle.