On July 4, 2023, the Perseverance Rover celebrated its 842nd Martian day on Mars. As the red sky above began to grow dark, the adventurous robot turned its left navigation camera to the hazy horizon.

With one snap, it captured a spectacularly alien sunset, around which the red planet's sky glowed a brilliantly strange cool blue.

Take a good look, because it's nothing like a sunset you will see here on Earth, and there's a good reason for that.

Mars is further from the Sun than Earth, which means light on this nearby planetary body is not nearly as powerful – at most, it receives less than half of the sunlight that we do.

On top of that, Mars has only a percent of the atmosphere that Earth does, and it mostly consists of carbon dioxide, with only a small fraction of nitrogen and trace amounts of oxygen.

This means that sunlight has very different interactions with the atmosphere on both planets.

Sunset Mars Blue Haze
Mars at twilight with color processing. (NASA/JPL-Caltech/MSSS/Damia Bouic)

When sunlight enters Earth's atmosphere, it interacts with oxygen, nitrogen, and other particulates in the sky, scattering blue light far and wide.

This is what gives our planet a blue sky during the day. As the Sun dips below the horizon or rises above it, however, its light has more atmosphere to penetrate. This means most of the blue and violet wavelengths are filtered out by the time the light reaches our eyes, leaving oranges and reds.

On Mars, instead of sunlight interacting with oxygen or nitrogen, it interacts with iron-rich dust that hangs in the atmosphere. This ultimately scatters lower-frequency red light through the sky during the day.

At twilight, however, the red light is filtered away and the sky glows a cool blue through the dusty haze.

The differences between the two planets can be seen below.

Mars and Earth Sunset
The difference between Earth (left) and Mars (right) at sunset. (NASA/JPL-Caltech/MSSS/PDS/USGS/Damia Bouic)

"The colors [on Mars] come from the fact that the very fine dust is the right size so that blue light penetrates the atmosphere slightly more efficiently," explains atmospheric scientist Mark Lemmon of Texas A&M University.

"When the blue light scatters off the dust, it stays closer to the direction of the Sun than light of other colors does. The rest of the sky is yellow to orange, as yellow and red light scatter all over the sky instead of being absorbed or staying close to the Sun."

Since sunlight continues to hit dust high up in the Martian atmosphere, this bluish haze can persist for several hours after a sunset or sunrise.

Mars Sunset Blue
NASA's Spirit rover snaps Martian sunset over Gusev crater in 2005. (NASA/JPL)

Twilight on Mars is a great time to take photos of dust and clouds, because they are lit against a dark background. Researchers can then use these images to study the composition of the Red Planet's atmosphere, allowing them to locate clouds of dust and ice more easily.

Earlier this year, for instance, the Curiosity rover caught an image of the Sun's rays piercing the twilit clouds of the Martian sky with a clarity never seen before.

Night Clouds
Night-shining clouds on Mars lit by a ray of sunlight taken by the Curiosity rover. (NASA/JPL-Caltech/MSSS)

"By looking at color transitions, we're seeing particle size changing across the cloud," says atmospheric scientist Mark Lemmon from the Space Science Institute in Boulder, Colorado.

"That tells us about the way the cloud is evolving and how its particles are changing size over time."

For nearly two decades now, Mars' sunsets have been captured by the Curiosity rover, the Perseverance rover, the Spirit rover, and the Opportunity rover.

No matter how many we receive, they never get any less magnificent.