The launch was also an important step for the goals of Elon Musk, who founded SpaceX in 2002 and who says the objective of the company is to send people to space and eventually Mars. “It's been 17 years to get to this point,” said Mr. Musk.

He described himself as emotionally exhausted. “But it worked,” Mr. Musk said of Crew Dragon. “So far.”

[Sign up to get reminders for space and astronomy events on your calendar.]

To date, the company has sent into space only satellites and cargo (and one Tesla sports car). “We still haven't launched anyone yet, but hopefully, we will later this year,” Mr. Musk said. “So that would definitely be a culmination of a long dream for a lot of people, me and a lot of people at SpaceX.”

For the past eight years, NASA has been paying for rides on Russian spacecraft to get its astronauts to and from the International Space Station. Instead of developing and operating its own replacement for the space shuttles, NASA has instead turned to private companies to provide that service. In 2014, the space agency awarded two contracts, to SpaceX and to Boeing.

The mission that launched Saturday, known as Demo-1, is an end-to-end test of the spacecraft from launch to docking at the International Space Station to re-entering over the United States and splashing down in the Atlantic Ocean.