SpaceX has pulled off a dramatic first in its Starship program, catching a returning spacecraft in midair with giant mechanical arms at the same Texas launch site where its journey began 22 hours earlier.

The spaceship descended slowly through cloudy skies on Saturday over Starbase, then slipped smoothly between the so-called chopstick arms positioned above Launch Pad 2. It marked the first time a Starship flying back from space had been captured in this way.

Shortly after the catch, SpaceX founder and chief executive Elon Musk congratulated his "incredible team" on the achievement. Company officials said the successful capture demonstrates that Starship is fully reusable, a capability they see as crucial to flying the vehicle again rapidly and at low cost.

The celebration was not complete, however. The rocket's first-stage booster exploded shortly after liftoff from Texas on Friday, denying the company the double catch it had hoped for. The booster and the spacecraft had separated cleanly, but problems emerged during the booster's return.

SpaceX's Kate Tice said the booster's engines stopped firing too early during the descent. Its guidance system detected that it was off position and automatically steered it toward the water, where it destroyed itself. Engineers are still investigating what caused the failure.

Despite Friday's setback, SpaceX noted it had already completed three successful booster catches in earlier flights, which had validated the recovery technique before this mission.

The upper-stage spacecraft, meanwhile, performed strongly after separating from its booster. It soared into orbit and deployed 26 advanced Starlink satellites before beginning its return to Earth. In total, Starship completed 14 laps around the planet at an altitude of 265km (165 miles), far exceeding the one to two laps managed on the previous mission.

SpaceX reported that everything on the spacecraft appeared to work well, including its critical heat shield. The flight was the company's 15th launch of a full-scale Starship since 2023 and only its second trip to orbit.

NASA, which is paying billions of dollars for Starship to land Artemis astronauts on the Moon later this decade, welcomed the result. "It was almost magic," NASA Administrator Jared Isaacman wrote on X.

Standing 124 metres (407ft) tall, Starship is the world's largest and most powerful rocket, designed with eventual missions to the Moon and Mars in mind. SpaceX expects to begin launching Starships from Florida's Kennedy Space Center within the next few months.