CAPE CANAVERAL, Fla. — Two NASA astronauts returned to Earth on Sunday in a dramatic, retro-style splashdown, their capsule parachuting into the Gulf of Mexico to close out an unprecedented test flight by Elon Musk’s SpaceX company.

It was the first splashdown by U.S. astronauts in 45 years, with the first commercially built and operated spacecraft to carry people to and from orbit. The return clears the way for another SpaceX crew launch as early as next month and possible tourist flights next year.

Test pilots Doug Hurley and Bob Behnken arrived back on Earth in their SpaceX Dragon capsule named Endeavour, less than a day after departing the International Space Station and two months after blasting off from Florida. The capsule parachuted into the calm gulf waters about 40 miles off the coast of Pensacola, hundreds of miles from Tropical Storm Isaias pounding Florida’s Atlantic coast.

“Welcome back to planet Earth and thanks for flying SpaceX,” said Mission Control from SpaceX headquarters.

“It’s a little bit overwhelming to see everybody here considering the things that have gone on the last few months since we’ve been off planet,” Hurley said after arriving back home in Houston Sunday evening where they were greeted by a small masked-gathering of family and officials, including Musk.

Musk had rushed to Houston from SpaceX headquarters in Hawthorne, California, to welcome them. He was clearly moved — and relieved — while addressing the group.

“I’m not very religious, but I prayed for this one,” he said.

The astronauts’ ride back to Earth was fast, bumpy and hot, at least on the outside.

The spacecraft went from a screaming orbital speed of 17,500 mph (28,000 kph) to 350 mph (560 kph) during atmospheric reentry, and finally to 15 mph (24 kph) at splashdown. Peak heating during descent was 3,500 degrees Fahrenheit (1,900 degrees Celsius). The anticipated top G forces felt by the crew: four to five times the force of Earth’s gravity.

Within a half-hour of splashdown, the scorched and blistered 16-foot capsule was hoisted aboard a SpaceX recovery ship with a staff of more than 40, including doctors and nurses. To keep the returning astronauts safe in the pandemic, the recovery crew quarantined for two weeks and were tested for the coronavirus.

The opening of the hatch was held up briefly by extra checks for toxic rocket fumes outside the capsule. After medical checkups, the astronauts were flown by helicopter to Pensacola and then to Houston.

There was one unexpected problem that could have endangered the operation: Once the capsule was in the water, private boats “just made a beeline for it,” and got too close, said NASA Administrator Jim Bridenstine, promising to do better next time at keeping sightseers on pleasure boats safely away. NASA video showed one vessel flying a large campaign flag for President Donald Trump.

The Coast Guard in Pensacola said it had deployed two vessels to keep the public at least 10 miles away from the capsule.

Trump and Vice President Mike Pence, who both attended the launch, congratulated the SpaceX and NASA teams.

“Great to have NASA Astronauts return to Earth after very successful two month mission. Thank you to all!” Trump tweeted.