Four astronauts aboard the Crew Dragon capsule made a sucessful splashdown in darkness on Sunday, as SpaceX returned them safely back to Earth from a record-setting mission to the International Space Station. 

The capsule made a parachute landing in the Gulf of Mexico just before 3 a.m., wrapping up the second manned flight for Elon Musk's aerospace company.

The astronauts spent 167 days in space and the express trip back home lasted 6 and a half hours.

"Earthbound!" NASA astronaut Victor Glover commented on Twitter after departing the ISS. "One step closer to family and home!"

"We've been practicing to recover the crews day or night," Agence France-Presse quoted Steve Stich, NASA's Commercial Crew program manager, as saying moments before the Dragon's departure.

A team of recovery vessels waited to retrieve the Crew Dragon out of the water, moving quickly as strong waves can cause severe seasickness for the astronauts.

The 167-day mission is the longest for astronauts that launched onboard an American-made spacecraft.

The previous record of 84 days and 3 months was set by NASA's final Sky Lab station crew in 1974.

This is only the second time NASA and SpaceX have brought astronauts home aboard a Crew Dragon space vehicle after the historic return of NASA astronauts Douglas Hurley and Robert Behnken from SpaceX's Demo-2 mission in August.

The departure was initially set for Wednesday but canceled twice because of forecasts of bad weather at the splashdown site.

Seven astronauts remained on the ISS including a new crew of four who arrived on a different SpaceX vehicles last week.