Elon Musk’s private spaceflight company SpaceX delivered the Jason-3 ocean-monitoring satellite for NASA into orbit yesterday. The Jason-3 satellite is designed to measure changes in ocean sea levels due to climate change, and also help scientists forecast changes in weather patterns.

After delivering the Jason-3 satellite into orbit, the reusable Falcon 9 rocket’s second mission was to land itself on a deck of a droneship in the Pacific Ocean. The Falcon 9 narrowly missed a successful test landing after one of the landing legs failed to keep the rocket upright.

First reports across Twitter suggested the rocket came down too fast, damaging one of the legs, but shortly thereafter, Elon tweeted the following update.

However, that was not what prevented it being good. Touchdown speed was ok, but a leg lockout didn't latch, so it tipped over after landing.

The following video originally released through Elon’s Instagram shows the Falcon 9 rocket successfully returning to the droneship at sea, but ends up in a fiery explosion after the rocket tips over due to a faulty landing leg.

There will be future attempts to land at sea. SpaceX has recently been awarded a contract by NASA to fly resupply missions to the International Space Station and carry crew to space using its Dragon spacecraft by 2017.