The orbit of comet C/2013 A1 Siding Spring swings around the sun in 2014. NASA/JPL-Caltech

NASA, on Thursday, released an image of a comet that is expected to pass within 84,000 miles of Mars -- less than half the distance between Earth and the moon -- on Oct. 19, and the finding could help scientists determine potential hazards to spacecraft in the vicinity of the red planet. The average distance from Earth to the moon is about 238,855 miles.

Hubble also observed the comet, called comet C/2013 A1 or Siding Spring, on Jan. 21 as Earth was crossing its orbital plane, which is the path the comet takes as it orbits the sun. This positioning of the two bodies allowed astronomers to determine the speed of the dust coming off the comet’s nucleus.

“This is critical information that we need to determine whether, and to what degree, dust grains in the coma of the comet will impact Mars and spacecraft in the vicinity of Mars,” Jian-Yang Li of the Planetary Science Institute in Tucson, Ariz., said in a statement.

Check out the two images here:

The images above show -- before and after filtering -- comet C/2013 A1, also known as Siding Spring, as captured by Wide Field Camera 3 on NASA's Hubble Space Telescope. NASA, ESA, and J.-Y. Li (Planetary Science Institute)

The image on the left, captured on March 11, shows Siding Spring at a distance of 353 million miles from Earth. However, Hubble cannot see the comet’s icy nucleus, because of its diminutive size. In addition, the nucleus is also surrounded by a glowing dust cloud, or coma, which measures about 12,000 miles across.

The right image shows the comet after the image was processed to remove the hazy glow of the coma, revealing what appear to be two jets of dust coming off the nucleus in opposite directions. According to NASA, this observation would allow astronomers to measure the direction of the nucleus’s pole and its axis of rotation.

Siding Spring was discovered on Jan. 3, 2013 by Robert H. McNaught at Australia’s Siding Spring Observatory. The comet is expected to make its closest approach to the sun on Oct. 25, at a distance of 130 million miles. The comet is not expected to become bright enough to be seen by the naked eye, astronomers said.