Elon Musk’s SpaceX finally stuck the landing of one of its Starship spacecraft prototypes Wednesday, a key milestone in the test program and a dramatic statement coming just two weeks after NASA chose the vehicle to fly its astronauts to the surface of the moon.

The Starship spacecraft, known as Serial Number 15 (SN15), lifted off from SpaceX’s launch site near the U.S.-Mexico border in South Texas, firing its three Raptor engines to an altitude of about 6 miles. It then turned itself sideways in a “belly flop” maneuver and headed back to Earth before righting itself, reigniting its engines and touching down softly.

“The Starship has landed,” John Insprucker, SpaceX principal integration engineer, said during the live broadcast.

It marked the second time SpaceX has landed Starship. A previous version exploded a few minutes after it landed harder than anticipated.

Other versions blew up during crash landings, and one exploded just before touching down — a series of Earth-shattering fireballs that turned the stainless-steel spacecraft into shrapnel.

Despite those setbacks, Musk has said he was optimistic about the SN15 flight and the spacecraft’s ability to make it to orbit by the end of this year and eventually transport people. But, he added, “obviously we need to, like, not be making craters.”

The lack of a crater this time was a triumph then — not only for SpaceX but for NASA, which is now heavily invested in Starship and will oversee its development after awarding SpaceX a $2.9 billion contract to ferry astronauts to the lunar surface.

The successful test also served notice, coming as SpaceX finds itself under attack by the two competitors it beat out for the NASA contract: a team led by Blue Origin, the space venture founded by Jeff Bezos, and Dynetics, a defense contractor. (Bezos owns The Washington Post.)

Both companies have protested the award with the Government Accountability Office, saying the process was flawed and that the space agency should have two providers in case one stumbles. They also are lobbying members of Congress and the space agency’s leadership to add funding for another spacecraft that could move astronauts to and from the lunar surface.

While all that happens behind the scenes, SpaceX is pressing ahead with its Starship program at a blistering pace. On Tuesday, it launched its Falcon 9 rocket from the Kennedy Space Center in Florida in a mission that hoisted 60 Starlink satellites to orbit. They are part of a constellation of more than 1,000 satellites that SpaceX has put into space to beam the Internet to remote areas.

SpaceX also flew its third group of astronauts to the International Space Station late last month, and on Sunday it returned four astronauts from the orbiting laboratory in its Dragon spacecraft.

Musk, who is set to host “Saturday Night Live” this weekend, is focused on Starship, a fully reusable system that he is planning to use to take people to the moon and Mars. The Starship prototypes SpaceX has been testing at its facility in Boca Chica, Texas, would serve as the second stage of the rocket and be hoisted to orbit by what SpaceX calls the Super Heavy booster. Combined, the stainless steel booster and the spacecraft would be nearly 400 feet tall, larger than the Saturn V rocket that flew the Apollo astronauts to the moon.

While Musk’s ultimate goal is to use Starship to send people to Mars, he recently said that “it’s a great honor to be chosen by NASA to return people to the moon. It's been now almost half a century since humans were last on the moon. That's too long. We need to get back there and have … a permanently occupied based on the moon.”

So far, SpaceX has been funding a lot of the development internally, he said. “And it’s been pretty expensive. As you can tell if you’ve been watching the videos, you know we’ve blown up a few of them. So, excitement guaranteed.”

But being able to fly the spacecraft and the booster back so they can be reused would “revolutionize space,” he said. It would cut the cost of access to orbit and beyond “by potentially a factor of 100 or more.”