(CNN) Some stars live fast and look beautiful doing it before they die young in a brilliant explosion. AG Carinae, a blue giant star located 20,000 light-years from Earth in the Milky Way galaxy, is one of those stars.
This bright star's explosive infamous temper tantrums are part of what make it so scintillating.
The Hubble Space Telescope captured an image of one of the star's outbursts to celebrate the observatory's 31st anniversary since launching into space on April 24, 1990.
AG Carinae is one of the brightest stars in our galaxy -- radiating the light of 1 million suns -- and it's about 70 times more massive than our sun. It's also a rare one. There are fewer than 50 such stars across the Milky Way and its neighboring galaxies.
But this much brilliant light comes at a cost, as the star burns through energy at a ferocious rate. The star lashes out, expanding in size and releasing its outer layers into space. It's in a constant battle with itself -- mainly its own gravity and radiation -- to keep from collapsing in self-destruction. The star's massive size and blazing hot temperatures also factor into this tug of war.
Record-breaking flare erupts from neighboring star The pressure of radiation inside the star pushes out and gravity pushes in, causing the star to expand and contract. If the outward pressure is the winning force, it causes the star to puff up and explode its outer layers. AG Carinae is surrounded by a large, glowing gas and dust shell as a result of giant eruptions that took place 10,000 years ago. The gas and dust that comprise the shell equals 10 times the mass of our sun. This shell is five light-years wide, or the distance between Earth and its nearest star aside from the sun, known as Proxima Centauri . AG Carinae cast off this material because it was in danger of exploding in a supernova and its stability was at stake. These events occur once or twice for a star like AG Carinae. Sign up for CNN's Wonder Theory science newsletter. Explore the universe with news on fascinating discoveries, scientific advancements and more . After the explosive ejection, the star returns to its normal size and quiets down for a while. Luminous blue stars like AG Carinae experience a relatively quiet period in the beginning, followed by a "convulsive" phase across their relatively short life span, astronomically speaking. While our sun has a life expectancy of 10 billion years, these stars only survive for a few million years. These meteorites landed on Earth after a 22-million-year voyage AG Carinae is already a few million years old and remains unstable. "I like studying these kinds of stars because I am fascinated by their instability. They are doing something weird," said Kerstin Weis, a luminous blue variable star expert at Ruhr University's Astronomical Institute in Bochum, Germany, in a statement. AG Carinae is quiet once again, but it continues to release radiation and a stream of charged particles called stellar wind. This constant outflow from the star helps to shape the halo, or nebula, around the star, creating beautiful structures. The stellar wind, at 670,000 miles per hour, is traveling 10 times faster than the outer nebula. This forceful effect has carved out a space around the star. Hubble Space Telescope celebrates 30 years of discoveries and awe-inspiring images In the new Hubble image, the red material is a glowing mixture of hydrogen and nitrogen gas. The blue structures are clumps of dust that are reflecting starlight. Hubble captured its latest image of AG Carinae in both visible and ultraviolet light, which reveals the intriguing structures around the star in great detail. Scientists want to understand more about these rare stars, which usually end in giant supernova explosions that release heavy elements like iron into space.