NASA got an unexpected surprise on Saturday: Its New Horizons spacecraft cut off communications with Earth as it was headed toward Pluto.

NASA was able to re-establish communications with the spacecraft within 90 minutes, and it reported that it was "healthy" and still on course to fly by Pluto.

But to reconnect with Earth, the spacecraft kicked itself into safe mode, and it is now no longer taking photos or collecting other scientific data.

"This is scary," planetary scientist Emily Lakdawalla wrote for The Planetary Society. "It's not what the team wanted to be dealing with right now."

New Horizons is scheduled to fly within 6,000 miles of Pluto on July 14 and use seven instruments on board to collect information that will significantly advance the way we understand the tiny, icy world that is floating in space 4.67 billion miles away.

With the science instruments locked in safe mode, however, all of the photos and scientific measurements that scientists have been looking forward to were in jeopardy of never being collected.

But it looks as if NASA has resolved the issue:

Within hours of the reported problem on Saturday the team convened a review board, and on Sunday it reported that it had found the cause of the problem:

"The underlying cause of the incident was a hard-to-detect timing flaw in the spacecraft command sequence that occurred during an operation to prepare for the close flyby," NASA wrote in a statement.

Knowing that, the New Horizons team's main goal was to get the spacecraft from safe mode back into its normal operating mode so it could continue to study Pluto upon its closest approach on July 14.

NASA reported on Sunday that it planned to re-establish normal operations and start collecting scientific data on Tuesday.

Moreover, the command sequence that caused Earth to lose contact with New Horizons should be the last one of its kind until the flyby. Therefore, there should be no risk of the same incident occurring again anytime soon.