The planet Mercury (small dot on left) passes in front of the Sun and below a large sunspot as seen through a solar filtered telescope from Palm Beach Gardens, Florida on Nov. 8, 2006. The next Mercury transit of the Sun will not happen until May 9, 2016. Reuters/Doug Murray

In a break from its routine job to uncover Mars’ geological secrets, NASA’s Curiosity rover got a never-before opportunity to capture images of Mercury passing in front of the sun.

The images, which show Mercury as a faint dark spot moving across the sun, are the first to demonstrate a planet’s pass-by of the sun as seen from any planet other than Earth. It is also the first instance when Mercury’s photos have been captured from Mars.

“Mercury fills only about one-sixth of one pixel as seen from such great distance, so the darkening does not have a distinct shape, but its position follows Mercury's expected path based on orbital calculations,” NASA said, in a statement.

According to NASA, Curiosity made the observations from the red planet's Gale Crater on June 3, showing Mercury as two "sunspots" approximately the size of Earth. In a video clip, based on the images, the sunspots are shown to be moving at the pace of the sun's rotation, which is considerably slower than Mercury’s movement.

On May 9, 2016, Mercury can be seen transiting the sun from Earth, while a similar incident will be visible from Mars, which offers more such views compared to Earth, as early as April 2015. In addition, a Venus transit of the sun will be visible from Mars in August 2030, followed by a transit of the sun by Earth in November 2084, according to NASA.

“This is a nod to the relevance of planetary transits to the history of astronomy on Earth,” Mark Lemmon of Texas A&M University, College Station, and a member of the Mastcan science team, said in the statement. “Observations of Venus transits were used to measure the size of the solar system, and Mercury transits were used to measure the size of the sun.”