Update: The Dragon spacecraft successfully docked with the International Space Station on Sunday morning.

CAPE CANAVERAL, Fla. — The United States space program took a significant step toward returning human spaceflight to American soil after a SpaceX rocket successfully blasted off from a historic launchpad at the Kennedy Space Center early Saturday.

Carrying a mannequin and 400 pounds of supplies, the company’s Dragon spacecraft was hurled into orbit on its way to the International Space Station in a crucial flight for NASA and for SpaceX, the California company founded in 2002 by Elon Musk.

The spacecraft is the first commercially built vehicle designed for humans to fly to the space station. If all goes well, a flight with humans could happen as soon as this year.

“We’re on the precipice of launching American astronauts on American rockets from American soil,” NASA Administrator Jim Bridenstine told reporters before the launch.

Since the space shuttle was retired in 2011, NASA has been unable to fly people to space and has been forced to rely on Russia to ferry its astronauts to the space station, the orbiting laboratory about 250 miles above Earth.

In a risky experiment, NASA decided years ago to outsource to the private sector its transportation to what’s known as low Earth orbit. In 2014, as part of the “commercial crew” program, the agency awarded contracts worth a combined $6.8 billion to SpaceX and Boeing to develop spacecraft capable of flying up to four astronauts to the station at a time.

While NASA has continued to fly probes and robots into deep space, and has even landed on Mars, the inability to fly humans has remained an embarrassment for an agency that beat the Soviet Union in the Cold War space race to the moon.

SpaceX’s Falcon 9 rocket blasted off at 2:49 a.m. Saturday from pad 39A, the same launchpad that hoisted Neil Armstrong and Buzz Aldrin to the moon and many of the space shuttle missions as well.

Speaking to reporters after the launch, Musk said he was “emotionally exhausted” after the flight, which he said was “super stressful. But it worked — so far.”

He said the flight was the culmination of 17 years of “an incredible amount of hard work and sacrifice."

SpaceX has used the site to ferry cargo and supplies to the space station. But despite all its successes, the company has yet to fly astronauts. SpaceX and Boeing originally planned to make their first flights with people within a few years of receiving the contracts but both programs faced technical challenges and funding issues from Congress.

NASA said it is on the verge of recapturing some of the national pride that has been a hallmark of its human spaceflight program since the beginning of the Space Age.

Boeing is scheduled to follow SpaceX’s flight with an uncrewed test launch of its Starliner spacecraft as early as next month. SpaceX plans to fly its first mission with astronauts by July. Boeing’s first flight with people is scheduled for August.

Bridenstine said he was “100 percent confident” those flights would happen this year. But he stressed it was more important to move deliberately so “we get it right.” Many officials have warned that, since the program is still in the test phase, the schedules are likely to slip, perhaps even significantly.

NASA astronaut Douglas G. Hurley, slated to be on the first SpaceX test flight with humans, said the prospect of the mission “is pretty exciting.”

Saturday’s flight “is the next critical step in putting people on Dragon,” he said. “I can’t begin to explain to you how exciting it is for a test pilot to be on a first flight of a vehicle. And we’ll be ready when SpaceX and NASA are ready for us to fly it.”

After the Dragon spacecraft separated from the rocket, Musk said he checked in with Hurley and Robert L. Behnken, the other NASA astronaut scheduled to fly on the first SpaceX crewed test flight. “I went over and asked what they thought, and how they felt about flying on it,” Musk said. The response was positive.

While the Dragon spacecraft launched successfully Saturday, the mission still has several significant hurdles to clear. Dragon has to safely dock with the station, which is expected to happen Sunday morning. The spacecraft will rely on its computers to autonomously fly the spacecraft gently alongside the station and then attach itself to one of the docking ports.

“We’re only partway through the mission,” Musk said. “But the system thus far has passed an exhaustive set of reviews.”

Initially, Russia, one of the partner countries on the station, raised concerns about the redundancy in SpaceX’s system should there be an emergency. But those concerns have been alleviated, NASA officials said this week.

Still, there are three astronauts on board the station — NASA astronaut Anne McClain, Canadian David Saint-Jacques and Russian cosmonaut Oleg Kononenko — so the pressure is on to make sure the spacecraft does not pose a threat to the station as it approaches.

The docking represents a “very critical mission,” Kirk Shireman, the manager of NASA’s space station program, told reporters last week. “This vehicle coming up to the ISS for the first time has to work. It has to work. This team up here, and the people who worked around the country to make this successful, are very much aware of that.”

If it is able to dock successfully, the spacecraft would remain attached to the station for five days. Then it would disembark and fly back to Earth, where it would fall through the atmosphere, a big test for the spacecraft’s heat shield and parachute system.

If all goes according to plan, it would splash down in the Atlantic Ocean on March 8.