This time the explosion came after the landing.

Elon Musk’s SpaceX successfully landed a prototype of its Starship rocket after flying it to an altitude of just over six miles, a key milestone in the test campaign of the spacecraft it hopes to one day fly astronauts to the moon and Mars.

But eight minutes after the landing, the spacecraft exploded on the pad, spewing debris across SpaceX’s launch site in South Texas. No one was on the rocket, and there were no reports of injuries.

In previous attempts, the rocket landed hard and exploded. But this version, known as Serial Number 10, or SN 10, seemed to go successfully from start to finish. It lifted off at 6:14 p.m. Eastern time from SpaceX’s launch site, coasted to its top altitude, and then fell back toward Earth horizontally as its fins provided stability.

The spacecraft then righted itself, refired its three engines and touched down softly in a cloud of dust and smoke.

“Third time’s a charm, as the saying goes,” said John Insprucker, SpaceX’s principal integration engineer. “A beautiful soft landing on the landing pad.”

But the rocket was still emitting streams of smoke and visibly leaning, and eight minutes and about 20 seconds after landing, it exploded in a dramatic fireball, likely because of a fuel leak, sending the vehicle shooting into the air for the second time.

Last month, a previous Starship prototype, SN9, launched successfully but landed hard and crashed on the pad. That was the same fate SN8 suffered during a test in December.

SpaceX likely won’t waste much time before it flies again. Insprucker said the next one, SN11, is “ready to roll out to the pad in the very near future.”

The test campaign for Starship is somewhat reminiscent of the process SpaceX went through as it learned to land its Falcon 9 rocket, the workhorse vehicle that flies cargo and crew to the International Space Station for NASA. At first, SpaceX crashed several boosters on ships at sea before finally pulling off a successful landing on a landing pad at Cape Canaveral in 2015.

For SpaceX, the Starship test campaign is more than a way for the company to learn how to fly and land the vehicle — it is also an audition of sorts for NASA. SpaceX is currently competing to build a spacecraft that would land NASA’s astronauts on the surface of the moon, as part of NASA’s Artemis program. Last year, SpaceX was one of three companies, along with Dynetics and Jeff Bezos’s Blue Origin, chosen in the initial phase of the contract. NASA is expected to winnow that to two companies as early as next month. (Bezos owns The Washington Post.)

Having a Starship prototype that can successfully launch and land could give SpaceX an advantage.

NASA’s leadership is reviewing the progress of its Artemis program and determining whether the program can meet the ambitious timetable set for it by the Trump administration, given the level of funding it has so far received from Congress.

The company says it hopes to fly Starship to Earth orbit this year, and it has plans to fly a Japanese billionaire, Yusaku Maezawa, and a crew of private citizens on a trip around the moon.

The mission is supposed to happen by 2023 — an aggressive timeline that would be enormously difficult to achieve. But Musk said in a video released by Maezawa, announcing a competition for people to apply for the mission, that he was optimistic it could happen. Musk, though, often offers rosy schedule predictions that often don’t come true.

“I’m highly confident that we will have reached orbit many times with Starship before 2023,” Musk said on the video. “And that it will be safe enough for human transport by 2023. It’s looking very, very promising.”

SpaceX has made a remote swath of land in the southern tip of Texas by the Gulf of Mexico its Starship base of operations. The site has grown tremendously in recent years as SpaceX has brought in more employees to boost its rocket development.

Musk tweeted on Tuesday that SpaceX was “creating the city of Starbase, Texas.”

The company has had conversations with local officials about incorporating the area, Cameron County Judge Eddie Trevino said in an interview with The Washington Post on Wednesday. But he said it has received no formal application and was “surprised by the tweet.”

The county’s legal department is reviewing “what the requirements are” for establishing a city.

Meanwhile, Trevino said Starship testing has given the area a new dimension he hopes will lead to a long-term economic benefit for a region beset by joblessness and poverty.

“It’s extremely exciting that the testing, the research and development continues to go forward literally on a daily basis,” he said. “I think it’s a learning and growing experience for all of us. We’re getting used to having SpaceX in our backyard, and we’re trying to support them.”