Cape Canaveral, Fla. — The goal was always to fly humans. So even when SpaceX built a spacecraft designed to fly cargo and supplies to the International Space Station — but not astronauts — the designers added a curious feature designed to make a point: a window.

Inside SpaceX, that window became a symbol of its larger ambitions and a reminder to its workforce that human spaceflight was the ultimate goal, the reason Elon Musk started the company to begin with, as it works to eventually get people to Mars.

Since its founding in 2002, SpaceX has achieved remarkable feats few thought possible. It was able to design rockets that not only propelled their payloads to orbit, but landed back on Earth to be reused.

It launched the Falcon Heavy, a monster of a rocket with three boosters and 27 engines. It opened up the Pentagon’s launch market, which for a decade had been dominated by a joint venture of Lockheed Martin and Boeing.

But for all the successes over the years, and all the hype the company has generated along the way, it had never flown a single person.

Until Saturday.

At 3:22 p.m., SpaceX’s Falcon 9 rocket blasted off from the same launchpad that sent Neil Armstrong, Buzz Aldrin and Michael Collins to the moon in 1969. On board were two of NASA’s finest, Bob Behnken and Doug Hurley, a pair of friends whose job was to test the systems of the Dragon spacecraft.

On May 30, SpaceX’s Crew Dragon capsule separated from the Falcon 9 rocket’s second stage booster and entered a stable low-Earth orbit. (The Washington Post)

While the launch was delayed on Wednesday because of bad weather, Saturday’s flight went off without a hitch on a steamy Florida afternoon, and the spacecraft achieved orbit, sending Behnken and Hurley on a trip to catch up to the International Space Station, whizzing around the globe at 17,500 mph.

With the successful flight, SpaceX now joins rarefied company. Only three nations have sent humans to orbit. And while NASA has for years relied on contractors to build the rockets and spacecraft that have flown its astronauts, this launch was done under an unusual arrangement. Under what NASA calls its “commercial crew program,” it is relying on two contractors, SpaceX and Boeing, to design and build spacecraft to ferry its astronauts to the space station.

While NASA oversees the program and has deep insight into the rockets and spacecraft, the companies own and operate the hardware, not NASA.

For NASA, the launch was validation that the private sector could handle the immense burden of human spaceflight — an endeavor many, even those inside the space agency, believed never should have been outsourced to the private sector.

For SpaceX, it is a tremendous victory, and it now becomes the first private company to fly people to orbit. (Virgin Galactic, the venture founded by Richard Branson, has twice flown people to the very edge of space and back, in up-and-down suborbital flights.)

During a post-launch news conference, Musk was emotional, his voice catching.

“I’m really overcome with emotion, and it’s really hard to talk,” he said. “We have not yet docked, and of course we need to bring them back safely. So it’s a lot of work to do. But it’s just incredible.”

He said that on Wednesday, when the launch was scrubbed due to bad weather, his adrenaline was running at “100 percent.” But then when the flight didn’t go off “it went to zero. I collapsed and slept the longest I had in probably a year.”

By Saturday, the feeling had changed dramatically. Musk felt calm and relaxed, ready to go, even though the skies were threatening again.

“I didn’t feel nervous. I felt like it was going to work,” he said.

Initially, Musk only gave SpaceX a 10 percent chance of succeeding as a company. And as for the people who doubted SpaceX, Musk said he thought their “probability assessment was correct. Fortunately, fate smiled upon us and brought us to this day.”

The goal now is to make human spaceflight routine. Saturday’s mission was a test flight, the first flight of the Dragon spacecraft with humans on board. And SpaceX will focus on Sunday’s docking with the space station, and then eventually ensuring Behnken and Hurley come back safely.

It’s hoping to fly another mission with astronauts to the station by Aug. 30, though officials have said that date is tentative and will likely change.

Beyond flying humans to the station in low Earth orbit at about 240 miles high, SpaceX ultimately wants to fly people to the moon, some 240,000 miles away. It recently won a contract from NASA to build a spacecraft capable of landing humans on the lunar surface.

Ultimately, though, Musk wants to send humans to Mars, a hugely ambitious goal.

To do that, the company is working on a next-generation spacecraft, known as Starship, that ultimately SpaceX hopes would be able to fly dozens of people to deep space.

On Friday, the day before achieving its historic flight with astronauts, a Starship prototype blew up on the test stand at the company’s facility in Boca Chica, Tex. It was a huge explosion, sending a fireball into the sky, that was reminiscent of the failed attempts of SpaceX’s early days, when three of its Falcon 1 rockets failed to reach orbit.

At the time, many looked at those failures as evidence that SpaceX would never be successful, let alone be able to fly people to orbit.

But SpaceX pressed on, undeterred.