The objects were spotted by astronomers who are part of an international consortium known as Wide Area Search for Planets (Wasp).
The planets, named Wasp-148b and Wasp-148c, orbit a sun-like star about 800 light-years away in the constellation of Hercules.
According to the scientists, these giant objects are able to “feel each other’s gravity”. This causes the faster-orbiting Wasp-148b to speed up and slow down as it overtakes Wasp-148c on the inside.
To observing astronomers, this phenomenon makes it look like the planets are dancing.
Professor Andrew Collier Cameron, from the University of St Andrews and Wasp team member, said: “This is the first time we’ve found a pair of giant planets interacting so closely and it’s exciting to be able to follow their dance from the ground.”
An international team of scientists, which also included scientists from The Open University (OU) and University of Warwick, made the discovery using instruments on Earth rather than with space telescopes.
Wasp-148b was identified by a range of instruments installed at the Roque de los Muchachos Observatory in La Palma, Canary Islands.
The star system was then observed with an instrument known as Sophie at the Observatoire de Haute-Provence in France.
They found Wasp-148b, which is about the size and mass of Saturn, takes about 8.8 days to circle its host star. The orbital period for Wasp-148c, thought to have a mass half that of Jupiter, is around 34.5 days.
According to the researchers, this ratio between the orbital periods suggests the Wasp-148 system is close to resonance, meaning there is enhanced gravitational interaction between the two planets.
The scientists also observed the planetary transit, which is when a planet crosses in front of its host star, of both Wasp-148b and Wasp-148c.
The found both Wasp-148b and Wasp-148c undergo acceleration and deceleration as they pass each other, which according to the researchers is evidence of gravitational interaction between them.
The researchers liken this gravitational dance between the planets to pushing a child on a swing – where adding force just at the right time produces large variations in timing and movement.