A prototype of the massive spacecraft Elon Musk’s SpaceX is building to take people to the moon and Mars exploded upon landing Wednesday after a seemingly successful launch and flight. Still, the company called it “an awesome test,” and Musk said the company “got all the data we needed.”

The Starship rocket has been Musk’s passion for years, a vehicle that has gone through multiple design changes as SpaceX has worked to develop a craft that could eventually fly people to deep space.

Before the test flight, SpaceX cautioned that there will probably be setbacks during the ongoing development of the vehicle. And before Wednesday’s flight, it said that “with a test such as this, success is not measured by completion of specific objectives but rather how much we can learn, which will inform the probability of success in the future as SpaceX rapidly advances development of Starship.”

Starship, made of stainless steel, with aerodynamic flaps to help control its trajectory, was supposed to fly to an altitude of nearly eight miles, then fall back through the atmosphere in a belly-flop position before reorienting itself, reigniting its engine and touching down softly.

It appeared to complete all of those milestones, except for the landing, which sent a fireball and a plume of smoke over the Gulf Coast. No one was on board and no one was injured.

After the flight, Musk tweeted that it was a “successful ascent” and that the vehicle performed well. There was low pressure during the landing, “causing touchdown velocity to be high & RUD,” he wrote, using an acronym for “rapid unscheduled disassembly.”

“Even reaching apogee would’ve been great, so controlling all way to putting the crater in the right spot was epic!!” he wrote adding: “Mars, here we come!”

In various presentations over the years, Musk has championed the need for a massive, heavy-lift spacecraft that could refuel in space and be fully reusable. At times, Musk has given grandiose presentations of the rocket and his plans to one day build a city on Mars.

During an interview with The Washington Post in 2016, when Musk was calling Starship the “Mars Colonial Transporter,” he said his goal was “having an architecture that would enable the creation of a self-sustaining city on Mars with the objective of being a multi-planet species and a true space-faring civilization and one day being out there among the stars.”

The journey would be “dangerous and probably people will die — and they’ll know that,” he said. “And then they’ll pave the way, and ultimately it will be very safe to go to Mars, and it will be comfortable. But that will be many years in the future.”

In a blog post before the flight, SpaceX said it was hoping to test a number of systems, including the vehicle’s three Raptor engines, which burn methane and liquid oxygen, as well as how it behaves in the upper atmosphere.

Instead of attempting to fly straight to orbit, SpaceX has been taking an incremental approach with Starship, flying to progressively higher altitudes and then landing the vehicle on a site near the launchpad.

Despite knowing the test could fail, or end in a fireball, it still broadcast the flight, and scores of people lined the waterfront near South Padre Island, Tex., to watch.

The spacecraft that flew Wednesday was the eighth prototype SpaceX has built, and it says it has two more ready for the next steps in the test campaign. Musk has said he’d like the vehicle to make it to orbit by next year.

While many in the space industry are skeptical of Starship’s prospects, NASA has invested $135 million in the vehicle as part of its Artemis program to return astronauts to the moon. People in the industry were also skeptical when NASA awarded SpaceX a contract to fly astronauts to the International Space Station, saying human spaceflight should never be outsourced to the private sector and to a company as unproven as SpaceX.

In May, SpaceX successfully launched a pair of NASA astronauts to orbit and brought them home safely two months later. Over the summer, NASA certified the company for regular crewed flights to the station, and it completed another mission last month.