SpaceX has launched its heftiest rocket with 24 research satellites, a middle-of-the-night rideshare featuring a deep space atomic clock, a solar sail, a clean and green rocket fuel testbed, and even human ashes.

It was the third flight of a Falcon Heavy rocket, but the first ordered by the military.

The US Defence Department mission is expected to provide data to certify the Falcon Heavy — and reused boosters — for future national security launches. It marked the military’s first ride on a recycled rocket.

Both side boosters landed back at Cape Canaveral several minutes after lift-off, just as they did after launching in April, but the new core booster missed an ocean platform, not unexpected for this especially difficult mission, SpaceX noted.

“It was a long shot,” tweeted SpaceX founder and chief executive Elon Musk.

SpaceX did manage for the first time to catch the fairing, or nose cone, in a giant net on an offshore boat. The California-based company is trying to recover and reuse as many rocket parts as possible — rather than letting the pieces sink in the ocean — to drive down launch costs.

Nasa signed up for a spot on this Falcon Heavy, along with the National Oceanic and Atmospheric Administration, the Air Force Research Laboratory, the Planetary Society and Celestis, which offers memorial flights into space.

An astronaut who flew on Nasa’s first space station back in the 1970s, Skylab’s Bill Pogue, had some of his ashes on board, along with more than 150 other deceased people. He died in 2014.

Mr Musk said it was “our toughest rocket launch ever”. The satellites needed to be placed in three different orbits, requiring multiple upper-stage engine firings. It took several hours to release them all.

The Deep Space Atomic Clock from Nasa’s Jet Propulsion Laboratory is a technology demo aimed at self-flying spacecraft. Barely the size of a toaster, the clock is meant to help spacecraft navigate by themselves when far from Earth. Nasa was also testing a clean and green alternative to toxic rocket and satellite fuel.

The Planetary Society’s LightSail crowd-funded spacecraft will attempt to become the first orbiting spacecraft to be propelled solely by sunlight. It will be released next week from its temporary perch on a spacecraft and opened a week later.

“Our #LightSail2 is up and on its way,” tweeted Bill Nye, the society’s chief executive officer.

It’s the society’s third crack at solar sailing. The first was lost in a Russian rocket failure in 2005, while the second had a successful test flight in 2015.

The Air Force Research Laboratory had space weather experiments aboard, while the NOAA had six small atmospheric experimental satellites for weather forecasting.

The Falcon Heavy is the most powerful rocket in use today. Each first-stage booster has nine engines, for a total of 27 firing simultaneously at lift-off from Nasa’s Kennedy Space Centre.

The first Falcon Heavy launch, in February last year, put Mr Musk’s red Tesla convertible into an orbit stretching past Mars.