SpaceX’s Dragon spacecraft splashed down safely in the Atlantic Friday after undocking from the International Space Station, appearing to successfully complete the first mission of the vehicle the company designed to fly humans.

There were no people on board the spacecraft, built to carry four NASA astronauts to the International Space Station. The nearly week-long journey culminated when the spacecraft disembarked from the station about 2:30 a.m. Friday, fired its engine to slow down, and barreled through the thickening atmosphere on its fiery return to Earth until finally splashing down into the Atlantic Ocean at 8:45 a.m.

The capsule was hoisted out of the water and placed on the deck of a recovery boat shortly before 10 a.m.

The mission comes at a precarious time for brash billionaire Elon Musk, SpaceX’s founder and CEO, who has come under fire for his sometimes erratic behavior.

The reentry is one of the biggest tests of the Dragon and of SpaceX, the company founded by Musk in 2002 with the ultimate goal of flying humans to Earth’s orbit and beyond. If deemed a complete success, the mission would give NASA increased confidence in one of its prime contractors and propel the space agency a step closer to restoring human spaceflight from U.S. soil.

Since the space shuttle was retired in 2011, NASA has been unable to fly its astronauts. Instead, it has paid Russia for rides to the space station at an increasing price tag that now tops $80 million.

In 2014, NASA awarded contracts worth a combined $6.8 billion to SpaceX and Boeing to build spacecrafts capable of carrying NASA’s astronauts to the orbiting laboratory 250 miles above Earth. Since then, both companies have faced delays and setbacks. But now, SpaceX has taken a major leap forward and is poised to fly its first test mission with two NASA astronauts on board later this year.

Boeing is scheduled to fly its first uncrewed mission to the station by next month at the earliest, though that date is likely to slip, officials have said.

SpaceX’s uncrewed mission began early Saturday, when its Falcon 9 rocket blasted off in the predawn darkness from a historic launchpad at the Kennedy Space Center in Florida, where the crew of Apollo 11 began their journey to the lunar surface.

Once aloft, the SpaceX craft traveled to the space station, whizzing around Earth at 17,500 mph, catching up early the next morning. Before the mission, NASA officials had said the spacecraft’s ability to dock autonomously to the station would be one of the biggest tests of the vehicle.

Russia, one of NASA’s key partners on the space station, initially objected, citing concerns with SpaceX’s computer systems that would fly the vehicle toward the station.

But like the launch, the docking was a success, and soon the three astronauts on board the station — NASA’s Anne McClain, Oleg Kononenko of Russia, and Canada’s David Saint-Jacques — were able to check out the first commercial space vehicle designed for human space flight ever to dock with the station.

In a call with the astronauts on board the station Wednesday, Vice President Pence said, “It was inspiring to see the launch, and it was actually more inspiring to see the docking, and to see you all open that door and float into that spacecraft knowing that we’ll very soon have American astronauts arriving at the International Space Station in the same vehicle.”

The successful landing is a coup for SpaceX and a relief for Musk, who said he wouldn’t be able to relax until the spacecraft had landed safely.

Musk and his companies have been under scrutiny lately. The Securities and Exchange Commission fined him $20 million last year after it said he misled investors of his electric car company, Tesla, when he tweeted that he would take the company private. More recently, the SEC claimed he violated the terms of the settlement, which require an attorney to review tweets that could affect Tesla’s stock price.

A judge in that case gave Musk until Monday to say why he should not be held in contempt for violating the terms of the settlement.

Musk has also faced trouble at SpaceX. The Air Force recently announced it was reviewing the certifications it had granted SpaceX that allow to launch national security payloads. After Musk smoked marijuana during a podcast appearance, NASA announced it was conducting a safety review of SpaceX and Boeing. And Bloomberg News reported Thursday that Musk’s marijuana use also prompted the Pentagon to review his security clearance.

Despite the distractions, Friday’s landing appeared to be another triumph for SpaceX, and validation of years of work.

Leading up to the reentry, Musk had said he was worried about whether the spacecraft would end up in an uncontrollable spin.

The Dragon is outfitted with abort thrusters that make the spacecraft asymmetrical, which he said “could potentially cause a roll.” But he said he thought it was “unlikely” since the company had run “simulations a thousand times.”

Still, he added “hypersonic reentry is probably my biggest concern."

Read more: