It came from a distant constellation 50,000 light years away - but its impact could be seen with the human eye.

Earth has been zapped by a 'giant flare' which was the equivalent of half a million years of sunlight in just a fraction of a second.

So powerful was the energy pulse that it bounced off the Moon and lit up the Earth's atmosphere, Nasa said.

It came from a neutron star known as a magnetar with an enormous magnetic field which was located on the other side of the Milky Way.

The stars, also known as Soft Gamma Ray Repeaters, usually emit flashes of low energy gamma rays, but sometimes when their magnetic fields re-align they can unleash immense bursts.
Image
© NASABlast from afar: Earth was zapped by the equivalent of half a million years of sunlight in just a fraction of a second in December 2004. It came from magnetar SGR 1806-20, a powerful energy pulse that bounced off the Moon and lit up our atmosphere

As it travelled through space the energy burst jolted thousands of orbiting satellites and ionized the entire upper atmosphere of the Earth, causing it to light up.

The flash was brighter than a full Moon and 'brighter than anything ever detected from beyond our Solar System,' according to NASA.

The incredible episode happened on December 27, 2004 and was caused by a pulse from magnetar SGR 1806-20.

'This might be a once-in-a-lifetime event for astronomers, as well as for the neutron star,' said Dr. David Palmer of Los Alamos National Laboratory in the U.S.

'We know of only two other giant flares in the past 35 years, and this event was one hundred times more powerful.'
Image
© NASAFlashlight: An artist's recreation of how the gamma ray flare expanded from SGR 1806-20 before impacting on Earth's atmosphere

The energy pulse posed no threat to Earth because it was so far away, but were one to happen nearer to us it could be lethal.

Magnetars can cause huge problems if they are even a dozen light years away and it is thought there are a vast number of them or the less powerful neutron stars in the Milky Way.

Scientists point to the powerful flare issued from star GRB 080319B which was aimed almost right at the Earth and hit on March 19, 2008.

The gamma ray burst was so bright it was visible to the human eye.
Image
© NASAOver as quickly as it started: The moment the energy burst lit up Earth's atmosphere

'The next biggest flare ever seen from any soft gamma repeater was peanuts compared to this incredible December 27 event,' said Dr Bryan Gaensler of the Harvard-Smithsonian Centre for Astrophysics in Cambridge, Massachusetts.

'Had this happened within ten light years of us, it would have severely damaged our atmosphere.

'Fortunately, all the magnetars we know of are much farther away than this.'