An artist's impression shows what an ultrahot exoplanet looks like just before it passes in front of its host star. As starlight passes through the gas giant's atmosphere, astronomers can spot specific elements.

Sign up for CNN’s Wonder Theory science newsletter. Explore the universe with news on fascinating discoveries, scientific advancements and more.

CNN  — 

Astronomers have spotted an unexpected chemical element high within the atmosphere of two sizzling exoplanets where liquid iron and gems rain down from the skies.

The two exoplanets, which orbit separate stars beyond our solar system, are ultrahot gas giants called WASP-76b and WASP-121b. Astronomers used the European Southern Observatory’s Very Large Telescope to detect barium at high altitudes in the atmosphere of each exoplanet.

Barium is the heaviest element ever discovered within the atmosphere of an exoplanet. The journal Astronomy & Astrophysics published a study detailing the discovery on Thursday.

With each revelation, WASP-76b and WASP-121b seem more strange to scientists.

“The puzzling and counterintuitive part is: why is there such a heavy element in the upper layers of the atmosphere of these planets?” said lead study author Tomás Azevedo Silva, a doctoral student at the University of Porto and the Institute of Astrophysics and Space Sciences in Portugal, in a statement.

“This was in a way an ‘accidental’ discovery. We were not expecting or looking for barium in particular and had to cross-check that this was actually coming from the planet since it had never been seen in any exoplanet before.”

Both exoplanets are similar in size to Jupiter, the largest planet in our solar system, but they have incredibly hot surface temperatures well above 1,832 degrees Fahrenheit (1,000 degrees Celsius).

The soaring temperatures on WASP-76b and WASP-121b stem from the fact that each planet is located close to its host star, completing a single orbit in about one or two days.

First discovered in 2015, WASP-121b is about 855 light-years from Earth. The exoplanet has a glowing water vapor atmosphere, and the intense gravitational pull of the star it orbits is deforming it into the shape of a football.

The planet is tidally locked, meaning the same side of the planet always faces the star. This is similar to how our moon orbits Earth. On the dayside, temperatures begin at 4,040 F (2,227 C) at the deepest layer of the atmosphere and reach 5,840 F (3,227 C) at the top layer.

Scientists spotted WASP-76b for the first time in 2016. It orbits a star in the Pisces constellation 640 light-years away from Earth. This exoplanet is also tidally locked, so on its dayside, which faces the star, temperatures exceed 4,400 F (2,426 C).

The sizzling nature of the exoplanets has given them unusual features and weather that seem like something out of science fiction. Scientists think liquid iron rains from the sky on WASP-76b, while metal clouds and liquid gems form on WASP-121b.

This illustration shows a nightside view of the exoplanet WASP-76b, where liquid iron rains from the sky.

Detecting barium in the upper atmosphere of each planet surprised researchers. The element is 2 1/2 times heavier than iron.

“Given the high gravity of the planets, we would expect heavy elements like barium to quickly fall into the lower layers of the atmosphere,” said study coauthor Olivier Demangeon, a postdoctoral researcher at the University of Porto and the Institute of Astrophysics and Space Sciences in Portugal, in a statement.

Finding barium in the atmosphere of both exoplanets might suggest that ultrahot gas giants have even more unusual features than suspected.

On Earth, barium appears in the night skies as a vibrant green color when fireworks are set off. But scientists aren’t sure what natural process is causing the heavy element to appear so high in the atmosphere of these gas giants.

The research team used the ESPRESSO instrument, or Echelle SPectrograph for Rocky Exoplanets and Stable Spectroscopic Observations, installed in the Very Large Telescope in Chile, to study starlight as it passed through the atmosphere of each planet.

“Being gaseous and hot, their atmospheres are very extended,” Demangeon said, “and are thus easier to observe and study than those of smaller or cooler planets.”

Future telescopes will also be able to spy more details within the atmospheric layers of exoplanets, including rocky ones similar to Earth, to unlock the mysteries of unusual worlds across the galaxy.