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.

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.