Mission control at the California-based company erupted in cheers as live images showed the rocket’s first stage standing upright on the droneship, after four previous attempts at water touchdowns failed.
“The first stage of the Falcon 9 just landed on our Of Course I Still Love You droneship,” SpaceX wrote on Twitter.
The effort is part of CEO Elon Musk’s bid to bring down the costs of spaceflight by reusing expensive rocket parts rather than jettisoning them in the ocean.
SpaceX had succeeded in one previous bid to return the rocket to solid ground.
The Falcon 9 propelled the gumdrop-shaped capsule packed with nearly 7,000 pounds (3,100 kilos) of supplies from Cape Canaveral, Florida at 4:43 pm (2043 GMT).
“Liftoff of the Falcon 9 rocket with science for today and for deep space exploration tomorrow,” said NASA commentator George Diller.
Celebrations were all the sweeter in light of a June 2015 accident blamed on a faulty strut in the Falcon 9’s upper booster which allowed a helium bottle to snap loose, causing the explosion of the rocket, cargo ship and all its contents just over two minutes into the flight.
SpaceX has since upgraded its Falcon 9 rocket and changed its protocol to avoid a repeat of the strut failure.