Comet Siding Spring shaved past a planet's surface at one third the distance of the Earth to the moon. But it wasn't Earth in the cross hairs -- it was our neighbor Mars.
Earth got lucky in more than one way. With a gang of NASA orbiters and rovers on and around Mars, their cameras and instruments got a historic front row seat on the comet that NASA said made the closest recorded pass ever by any planet.
The three orbiters are just coming out of hiding.
The comet came so close that Mars Odyssey, Mars Reconnaissance Orbiter and the Mars Atmosphere and Volatile Evolution (MAVEN) had to duck and cover on the other side of the planet.
Otherwise, Siding Spring's debris of dust and gas flying at 126,000 miles per hour just 87,000 miles above Mars' surface could have blasted them like a shotgun.
They're all OK, NASA said in a statement. It will take a few days for them to transfer pictures and data to Earth.
Siding Spring has moved on. The comet does not pose a threat to Earth and was headed back out to the outer reaches of the solar system, NASA said.
The Mars Reconnaissance Orbiter was the first of the spacecraft to report it was unharmed as the comet passed.
It made observations of the comet before sheltering behind Mars, NASA said.
"The spacecraft performed flawlessly throughout the comet flyby," said Mars Reconnaissance Orbiter Project Manager Dan Johnston of NASA's Jet Propulsion Laboratory. "It maneuvered for the planned observations of the comet and emerged unscathed."
The Mars Reconnaissance Orbiter immediately began to transmit information to Earth, but the full downlink could take days, NASA said.
Several Earth-based and space telescopes, including the Hubble Space Telescope, also took pictures.
The NASA rovers that are on the surface of Mars were protected by Mars' atmosphere, NASA said.
They watched Siding Spring much like a spectator would watch a comet flyby here on Earth.