NASA said its robotic spacecraft Osiris-Rex was able to stow a rock and dust sample scooped up from the asteroid Bennu.
The positive news came despite a flap being wedged open on the craft that put the mission at risk.
"We are here to announce today that we've successfully completed that operation," said Rich Burns, the mission's project manager.
The probe is on a mission to collect fragments that scientists hope will help unravel the origins of our solar system, but hit a snag after it picked up too big of a sample.
Fragments from the asteroid's surface in a collector at the end of the probe's three-metre arm had been slowly escaping into space because some rocks prevented the compartment from closing completely.
That arm is what came into contact with Bennu for a few seconds last Tuesday in the culmination of a mission launched from Earth some four years ago.
Today, NASA said it had been able a day earlier to manoeuvre the robotic arm holding the leaking particles to a storage capsule near the centre of the spacecraft, drop off the sample and close the capsule's lid.
It was a delicate two-day procedure, requiring the team at each step to assess images and data from the previous step.
I've officially closed the Sample Return Capsule! The sample of Bennu is sealed inside and ready for our voyage back to Earth. The SRC will touch down in the Utah desert on Sep. 24, 2023. Thanks, everyone, for being a part of my journey #ToBennuAndBack pic.twitter.com/z75ITNiGBf— NASA's OSIRIS-REx (@OSIRISREx) October 29, 2020
The probe is 320 million kilometres away, so it takes 18.5 minutes for its transmissions to reach Earth, and any signal from the control room requires the same amount of time to reach Osiris-Rex.
"My heart breaks for loss of sample," said Dante Lauretta, the mission's chief scientist.
However, he noted that they had successfully stowed hundreds of grams of fragments, far in excess of their minimum goal.
"Now we can look forward to receiving the sample here on Earth and opening up that capsule," he said.
Osiris-Rex is set to come home in September 2023, hopefully with the largest sample returned from space since the Apollo era.