A spacecraft on the way to sample an asteroid snapped this remarkable photo of Earth

A spacecraft on a mission to bite off a piece of an asteroid just flew past Earth, snapping a photo of our home planet along the way. 

NASA's OSIRIS-REx spacecraft is expected to get to the asteroid Bennu next year, but on Friday, about one year after its launch, the spacecraft slingshotted around Earth to get it speeding in the right direction for its meetup with the space rock, which is taller than the Empire State Building.

SEE ALSO: NASA just launched a spacecraft to help us find the origins of life on Earth

Scientists took the opportunity to snap photos of Earth for a composite image showing our entire planet.

"Visible in this image are the Pacific Ocean and several familiar landmasses, including Australia in the lower left, and Baja California and the southwestern United States in the upper right," NASA said in a statement

"The dark vertical streaks at the top of the image are caused by short exposure times (less than three milliseconds)."

Image: NASA'S GODDARD SPACE FLIGHT CENTER/UNIVERSITY OF ARIZONA

The OSIRIS-REx photo is part of the mission managers' plan to calibrate the spacecraft's instruments in anticipation of its arrival at the asteroid in late 2018.

Once at Bennu, OSIRIS-REx will study the space rock from close range and even sample the asteroid, collecting a piece of it to send it back to Earth for scientists to study in detail. Ideally, the sample should make it back to our planet by 2023. 

Researchers are particularly interested in learning more about Bennu because it's a remnant from the early days of the solar system, 4.5 billion years ago. 

By studying the asteroid up close, scientists should get a better sense of how planets and other objects in the solar system formed. 

It's even possible that data from Bennu could help explain how life came to be on Earth. Early asteroids might have slammed into Earth, delivering some of the ingredients for life as we understand it to form.

"The formation of the solar system was a violent but dimly recorded time," Jason Dworkin, OSIRIS-REx project scientist, said during a news conference ahead of the mission's launch in 2016.

"Although most of the record of the ancient Earth is lost to the dynamic geology that shaped our planet, there are lines of evidence that indicate that heavy bombardment by debris from the formation of the solar system around the same time helped form the oceans, and around a few million years later, life."

WATCH: NASA just launched a spacecraft to help us find the origins of life on Earth

Https%3a%2f%2fblueprint api production.s3.amazonaws.com%2fuploads%2fvideo uploaders%2fdistribution thumb%2fimage%2f342%2f271b9169 2c5e 46c3 b623 8d8bd146ead5
Https%3a%2f%2fblueprint api production.s3.amazonaws.com%2fuploads%2fvideo uploaders%2fdistribution thumb%2fimage%2f342%2f271b9169 2c5e 46c3 b623 8d8bd146ead5