SpaceX is cleared for lift off.

Elon Musk's SpaceX commercial space program got approval Friday from NASA to take a crew to the International Space Station -- SpaceX's first such mission.

The flight isn't set to happen until late 2017. But SpaceX can now begin preparing for the journey.

The flight is one of two guaranteed missions that SpaceX secured the rights to in a 2014 contract with NASA.

Boeing (BA), which was also awarded a contract with NASA last year, was given its first assignment in June.

As part of the contract, both Boeing and SpaceX are entitled to at least two and as many as six missions.

Related: Elon Musk's SpaceX set to get its first military contract

The deal is part of NASA's effort to transition some of its low-Earth orbit flights to less expensive commercial operators.

"Commercial crew launches are really important for helping us meet the demand for research on the space station," said Julie Robinson, International Space Station chief scientist.

SpaceX, which is based in Hawthorne, California, will use a Crew Dragon spacecraft and Falcon 9 rocket during the mission.

Elon Musk: The Hyperloop is easy, my interns can do it

The company noted the mission was a "significant milestone" and said it was proud to be able to move forward.

"When Crew Dragon takes NASA astronauts to the space station in 2017, they will be riding in one of the safest, most reliable spacecraft ever flown. We're honored to be developing this capability for NASA and our country," said SpaceX President and COO Gwynne Shotwell.

SpaceX has made six successful resupply trips to the International Space Station over the past four years. However, in June an unmanned Falcon 9 rocket, headed to the space station, exploded minutes after taking off.