For a little over a year, a tiny unmanned Japanese spacecraft has been sampling the surface of the near-Earth asteroid Ryugu, capturing images, blasting a little crater in it, and firing a "bullet" into its exterior to dislodge particles.

Now, after traveling about 180 million miles, Hayabusa2 has begun its yearlong journey back to Earth with valuable data and soil samples in tow.

The Japanese Aerospace Exploration Agency hopes to use the materials to explore the origins of the planets and the source of Earth's oceans.

The little spacecraft seems to already be experiencing twinges of nostalgia. As it slowly retreats from the asteroid it called home, Hayabusa2 has been snapping real-time photos of the asteroid as it departs and will continue this "Farewell Observation" until November 18.

Ryugu is a diamond-shaped asteroid just under 3,000 ft wide that orbits tens of millions of miles away from Earth. Hayabusa2's venture, which began in 2014, is the world's first sample return mission to a C-type asteroid.

It is occurring at the same time as NASA's own asteroid sample return mission, OSIRIS-Rex, which is expected to return to Earth in 2023.

The overlapping sample missions provide a special opportunity for the two agencies to compare findings and exchange samples, the Japanese Aerospace Exploration Agency said in a statement.