It is expected that it will be delivered to Earth as part of a future space mission.
NASA said that the Perseverance rover had recovered the first rock sample that scientists can study when a future mission returns it to Earth.
“It worked!” the space agency tweeted in a comment to a photo with a rock sample slightly thicker than a pencil inside a test tube.
The sample was taken on September 1, but NASA was not sure at first that the rover had successfully held the precious cargo since the first images were blurry due to poor lighting.
After taking a new picture so that the Earth could verify the contents of the test tube, the device moved it inside for further measurements and photographing, after which it hermetically closed the container.
“This is an outstanding achievement, and I can’t wait to see the incredible discoveries made by Perseverance and our team,” said NASA head Bill Nelson.