Sometimes, when a star dies, it goes supernova – going out in a massive explosion. For the first time, scientists have caught the so-called “shock breakout” of a supernova explosion in visible light.

“In order to see something that happens on timescales of minutes, like a shock breakout, you want to have a camera continuously monitoring the sky,” Peter Garnavich, an astrophysics professor at the University of Notre Dame, said in a statement. Garnavich led the team that spotted the breakout, and co-authored a study that's set to be published in the Astrophysical Journal.

Garnavich and his colleagues used the Kepler Space Telescope to keep a close eye on the night sky. The shockwave itself lasts less than an hour, but by analyzing light taken in by Kepler every 30 minutes over a three-year period from 500 distant galaxies – a field of vision that included some 50 trillion stars – they were finally able to catch the blast.

In fact, they caught two supernovae – massive red supergiants called KSN 2011a and KSN 2011d. The stars, each close to a billion light-years away, are 300 and 500 times the size of our sun, respectively.

“To put their size into perspective, Earth's orbit about our sun would fit comfortably within these colossal stars,” said Garnavich.

When stars this massive get old – and their cores run out of fuel for nuclear reactions – gravity causes them to collapse. The collapse of the star into a dense neutron star sends out a shockwave of energy. Scientists have predicted that the wave should result in a bright flash – the shock breakout.

You can see an animation based on the collected data in the video above. After the implosion of the old star, a shockwave rushes up toward its surface – breaking through in jets of plasma. Then, just minutes later, the shockwave finishes bursting through and the star explodes.

But only one of the two supernovae had a shock breakout that the scientists could see. The smaller star was lacking a visible shockwave – perhaps because gas surrounding it managed to mask the event. With just two supernovae on the table, scientists can't be sure what made them have different appearances. The hope is that the Kepler, now known as K2, will spot lots more supernovae for scientists to investigate.

"All heavy elements in the universe come from supernova explosions. For example, all the silver, nickel, and copper in the earth and even in our bodies came from the explosive death throes of stars," Steve Howell, project scientist for NASA's Kepler and K2 missions, said in a statement. "Life exists because of supernovae."

Read More: