The supernova observed in the galaxy UGC 9379.Avishay Gal-Yam, Weizmann Institute of Science

The violent death of a mammoth star has been captured by astronomers 360 million light years away in the Bootes constellation.

Wolf-Rayet stars are about 20 times as big as the sun and five times as hot, but little is known of them because they are rare and often obscured.

However astronomers from Israel's Weizmann Institute of Science, using a sky survey system called the intermediate Palomar Transient Factory (iPTF), managed to track down the death of one of these cosmic goliaths.

Scientists observed a violent explosion known as a Type IIb supernova of the Wolf-Rayet star within hours of it exploding. They were then able to observe the events that followed, providing an insight into how these stars die.

"This is the smoking gun. For the first time, we can directly point to an observation and say that this type of Wolf-Rayet star leads to this kind of Type IIb supernova," said Peter Nugent, head of the Berkeley contingent of the iPTF collaboration.

Some supermassive stars become Wolf-Rayets at the end stages of their lives. After they explode they enrich galaxies with heavy chemical elements that become the building blocks of life.

A Wolf-Rayet star in the M1-67 wind-nebula.ESO

Co-author Alex Filippenko said: "We are gradually determining which kinds of stars explode, and why, and what kinds of elements they produce. These elements are crucial to the existence of life. In a very real sense, we are figuring out our own stellar origins."

When a star collapses it releases a huge amount of energy, powering a shockwave that tears through the star ejecting its remains into space – going supernova.

"When a Wolf-Rayet star goes supernova, the explosion typically overtakes the stellar wind and all information about the progenitor star is gone," Nugent said. "We got lucky with SN 2013cu—we caught the supernova before it overtook the wind.

"Shortly after the star exploded, it let out an ultraviolet flash from the shock wave that heated and lit up the wind. The conditions that we observed in this moment were very similar to what was there before the supernova. "

With this information, authors were able to determine it was a Wolf-Rayet star and that it was a Type IIb supernova.

Explaining the implications, Nugent said: "This discovery was totally shocking. It opens up a whole new research area for us. With our largest telescopes you might have a chance of getting a spectrum of a Wolf-Rayet star in the nearest galaxies to our Milky Way, perhaps four million light years away. SN 2013cu is 360 million light years away."