SpaceX’s latest Starship prototype landed on Wednesday for the first time after carrying out a high-altitude test flight in Texas — but exploded minutes later on its landing pad. The rocket, an early test version called SN10, demonstrated a few complex dances in mid-air before clinching a soft touch down, aiming to nail a key milestone in Elon Musk’s campaign to build a fully reusable rocket system.

After aborting an initial launch attempt earlier in the day, the prototype lifted off at 6:14pm ET and soared 6 miles above SpaceX’s Boca Chica, Texas facilities. Unlike the last two tests with SN8 and SN9, which launched successfully but exploded on their landing attempts, SN10 stuck a lopsided landing on a slab of concrete not far from its launchpad, appearing to survive its daring landing maneuver for a few moments before being consumed in a fireball.

NASA Spaceflight

The launch test’s main objective was to demonstrate the computer-controlled movements of the rocket’s four aerodynamic flaps that steer its descent before landing, SpaceX engineer and live stream host John Insprucker said during the company’s broadcast.

At the end of its climb to 6.2 miles, each of the the rocket’s three Raptor engines gradually shut down to prepare for a brief free-fall back to land, reorienting itself horizontally with its “belly” facing the ground.

Then came the “belly flop” maneuver. The rocket’s three engines reignited to swoop itself into a vertical position for landing.

SN10 slowly descended on its landing pad, softly touching down but leaning slightly to the side. Insprucker declared it a success on SpaceX’s live feed: “Third time’s a charm, as the saying goes. We’ve had a successful soft touchdown on the landing pad.”

“As a reminder, the key point of today’s test flight was to gather the data on controlling the vehicle while reentering, and we were successful in doing so,” he said.

The SpaceX live feed ended before SN10’s explosive demise. Another feed, provided by the website NASA Spaceflight, kept the cameras rolling and captured the fireball, which lofted the 16-story-tall rocket back into the air before crashing back down on its side.

Musk tweeted at 7:35PM ET to celebrate that SN10 landed “in one piece,” but jokingly noted two minutes after that the rocket had an “honorable discharge.”

Starship is SpaceX’s next-generation, fully reusable Mars rocket system designed to ferry crews of astronauts and 100 tons of cargo on future missions to Earth orbit, the moon and eventually Mars. The last three prototypes SpaceX has test-launched are early versions of the top half of the full Starship system, whose bottom half is a reusable super-heavy booster powered by an array of SpaceX’s new Raptor rocket engines.