Astronomers have found an exoplanet with an absolute doozy of an orbit. Rather than a nice, more-or-less circular path around its star, the exoplanet HR 5183 b slingshots around more like a comet - a long, elliptical orbit with the star at one end of the oval.

It's the first time any exoplanet has been found with such a bizarre orbital path. If HR 5183 b were in our Solar System, it would swing in closer than the orbit of Jupiter, and then way out farther than the orbit of Neptune.

Although many other exoplanets have been found with elliptical orbits, they have been nowhere near as extreme.

"This planet is unlike the planets in our Solar System, but more than that, it is unlike any other exoplanets we have discovered so far," said astronomer Sarah Blunt of Caltech.

"Other planets detected far away from their stars tend to have very low eccentricities, meaning that their orbits are more circular. The fact that this planet has such a high eccentricity speaks to some difference in the way that it either formed or evolved relative to the other planets."

HR 5183 b is a massive gas giant that orbits a Sun-like main sequence star called HR 5183 around 103 light-years away.

Because the exoplanet's orbit is so weird - it takes around 74 years to orbit the star, swooping out as far as over 30 astronomical units - the team got really lucky in detecting it. They managed to capture it at periastron, its closest approach. That's less than 5 astronomical units.

It took a lot of patience. The star was under long-term surveillance as part of an exoplanet search using the radial velocity method. This is a very reliable method for finding exoplanets, based on the very slight movement of the star as it is tugged out of place by the gravity of its orbiting bodies.

For close-orbiting planets that take just days to whip around the star, this doesn't require a lot of time. But if you want to find distant exoplanets with orbits on the scale of years, decades or even centuries, you have to put in a lot of time. That's why the star was being monitored.

Then, after 10 years, something weird happened. The star started rapidly accelerating - pulled by the exoplanet's three-Jupiter mass. In 2018, the radial velocity measurements turned over and flattened out.

"This planet spends most of its time loitering in the outer part of its star's planetary system in this highly eccentric orbit, then it starts to accelerate in and does a slingshot around its star," said Caltech astronomer Andrew Howard.

"We detected this slingshot motion. We saw the planet come in and now it's on its way out. That creates such a distinctive signature that we can be sure that this is a real planet, even though we haven't seen a complete orbit."

The slingshot is a bit like the gravity assist manoeuvre spacecraft sometimes perform to get a speed boost. It flings the planet back out into the far reaches of the stellar system, where it eventually will reach its farthest point - apastron - and loop back again.

But how did it get that way? The observational evidence suggests that planets are formed from the circular disc of leftover material that didn't get slurped up into the star as it was forming. So, if things remain calm, planets should maintain a relatively circular orbit.

But we know comets can change their orbital paths when they interact gravitationally with larger Solar System bodies, and that provides a clue as to what could have happened with HR 5183 b.

The most likely scenario, the researchers said, was that HR 5183 b was once neighboured by another planet of similar size. When they got close enough to each other, the gravitational interaction could have kicked HR 5183 b into its weird orbit - and booted the other planet out of the stellar system entirely.

It seems the more we discover about exoplanets, the weirder they get.

We've seen huge exoplanets orbiting a tiny star. There's an exoplanet that's being rapidly evaporated by its star. There's an exoplanet with three suns, and an exoplanet with vaporised rare-Earth metals in its atmosphere. Maybe even exoplanets like giant space eyeballs.

And now HR 5153 b, the exoplanet rocketing around its star on a wildly elliptical orbit.

"It's just been one surprise after another in this field," Howard said.

"This newfound planet is another example of a system that is not the image of our Solar System but has remarkable features that make our Universe incredibly rich in its diversity."

The research is due to appear in The Astrophysical Journal, and is available on the pre-print website arXiv.