Something as gigantic as a supermassive black hole - which can contain a mass several billion times that of our Sun - isn’t going to just sit quietly at the centre of its galaxy.

Sometimes supermassive black holes shoot out jets of hot, ionised gas, which burst out of their galaxy and into intergalactic space beyond, and scientists have finally figured out why.

The problem with supermassive black hole jets is that they're extremely hard to predict, and this has been bugging astronomers for decades now.

Some jets will erupt from the centre of a galaxy, break through its outer halo, and appear as bright beacons streaking across the Universe, far from their home at the centre of the galaxy. Others will simply fizzle out and die before they do much of anything.

But what’s stopping them? What’s holding you back, little black hole jets?

It turns out the secret of these jets’ success is actually the very thing that can also lead to their downfall - the twisting magnetic fields that emanate from a rotating black hole.

Astronomers from the University of California, Berkeley ran a number of simulations to figure out how changes in these magnetic fields affect jet lifespans, and found that the only way a jet can withstand being shot across an entire galaxy is if it’s being propelled by stable magnetic fields from the black hole.

The more stable the magnetic fields, the more likely a jet is to be broader and stronger, which makes it able to survive the bumps and obstacles it faces as it erupts from the centre of the galaxy.

A jet in the galaxy Cygnus A, located about 600 million light-years from Earth, has been seen punching through its galactic halo and into intergalactic space like this.

But if a jet is being propelled by an unstable magnetic field, it will end up so narrow, one little bump will break it apart and send hot gas spewing everywhere, warming up the galaxy in the process.

Astronomers have observed this type of jet erupting from the galaxy M87 - about 50 million light-years away.

"If I were to jump on top of a jet and fly with it, I would see the jet start to wiggle around because of a kink instability in the magnetic field," says one of the team, theoretical astrophysicist Alexander Tchekhovskoy.

"If this wiggling grows faster than it takes the gas to reach the tip, then the jet will fall apart. If the instability grows slower than it takes for gas to go from the base to the tip of the jet, then the jet will stay stable."

Think of it like a piece of spaghetti being threaded through a pitted olive - as the olive (or black hole) rotates, the spaghetti (or magnetic field) gets twisted up like a corkscrew.

This twisting magnetic field is basically trying to drill through gas in the surrounding galaxy to get to its outer edges, but if something interferes with its movements, it will wobble, bend, and eventually break apart.

You can see the results of the simulation below, one looks like a majestic Shrek fart, the other, well...

What makes solving this mystery so cool isn’t just that Tchekhovskoy and his team have solved a 40-year-old mystery about one of the most enigmatic objects in the known Universe.

Because of how broken black hole jets affect the galaxy around them, being able to predict their movements will reveal a lot about how our Universe grows and heats up.

The team says these unstable jets could be at the heart of what’s known as black hole feedback, which makes it harder for a black hole to take in gas and grow in mass. "Unstable jets deposit a lot of energy within the galaxy that heats up the gas and prevents it from falling into the black hole," they explain.

So these feeble jets might actually be doing something very important - ensuring that the biggest black holes in the Universe don't get too big. Because everything, even a supermassive black hole, has to reign it in sometimes.

The results have been published in Monthly Notices of the Royal Astronomical Society: Letters.