On that date the comet, also known as C/2013 A1, passed by Mars at approximately 139,500 km, about one-third the distance between Earth and the Moon. At that time, the comet and Mars were approximately 240 million km from Earth.
The Hubble image shown above is a composite of several separate images of Siding Spring and the Red Planet.
NASA's Hubble Space Telescope took the image of Mars on October 18. The comet image is a composite of Hubble exposures taken on October 18-19. The images have been added together to create a single picture to illustrate the angular separation, or distance, between the comet and Mars at closest approach. The separation is 1.5 arcminutes, or 1/20th of the angular diameter of the full Moon.