SpaceX launched its heftiest rocket with 24 research satellites Tuesday, a middle-of-the-night rideshare featuring a deep space atomic clock, 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 up by the military.

The Defense Department mission, dubbed STP-2 for Space Test Program, 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.

SPACEX SUCCESSFULLY LAUNCHES 60 SATELLITES INTO ORBIT

Both side boosters landed back at Cape Canaveral several minutes after liftoff, 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.

NASA signed up for a spot on the rocket, along with the National Oceanic and Atmospheric Administration, the Air Force Research Laboratory, the Planetary Society and Celestis Inc., 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 a bit of his ashes on board, along with more than 150 other deceased people. Pogue died in 2014.

SpaceX said the mission was one of its most challenging launches. The satellites needed to be placed in three different orbits, requiring multiple upper-stage engine firings. It was going to take several hours to release them all.

The Deep Space Atomic Clock by NASA's Jet Propulsion Laboratory is a technology demo aimed at self-flying spacecraft. Barely the size of a toaster oven, the clock is meant to help spacecraft navigate by themselves when far from Earth. NASA also was 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'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.

CLICK HERE FOR THE FOX NEWS APP

"Hey @elonmusk et al, thanks for the ride!," tweeted Bill Nye, the society's chief executive officer.

The Air Force Research Laboratory had space weather experiments aboard, while 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 liftoff from NASA's Kennedy Space Center.

The first Falcon Heavy launch was in February 2018. That test flight put SpaceX founder Musk's red Tesla convertible into an orbit stretching past Mars.