The ashes of actor James Doohan — Scotty on the 1960s television series “Star Trek” — were launched into space May 22 aboard Space Exploration Technology Corp.’s (SpaceX) space station-bound Falcon 9 rocket.

Doohan’s ashes, along with those of more than 300 other people, flew as a small secondary payload provided by Celestis Inc., a Houston-based company that books memorial spaceflights for a symbolic portion of the dearly departed’s cremated remains.

“We had a Celestis canister on the second stage, not on Dragon,” SpaceX President Gwynne Shotwell said at a news conference following the company’s launch of its unmanned cargo capsule on a demonstration mission to the international space station. “They’ve actually been a customer of ours since 2005 or 2006.”

The Celestis payload was not announced by SpaceX prior to the launch, although news reports publicized its inclusion in the mission.

“So much for our ‘secret’ launch,” Charles Chafer, chief executive of Celestis’ parent company, Space Services Inc., wrote on his Facebook page May 20. The payload was, however, apparently secret enough to fool SpaceX founder and chief designer Elon Musk.

“If they were onboard I didn’t actually know that,” Musk said after liftoff. “I was focused on other things.”

Ashes from “Star Trek” creator Gene Roddenberry and his wife, Majel Barrett Roddenberry, as well as many others, have been booked on flights by Celestis. The ashes are packed into special capsules and added as payloads on orbital and suborbital rockets. Celestis charges $2,995 to launch 1 gram of a person’s ashes to Earth orbit. Deep-space launches start at $12,500, while flying on a suborbital rocket starts at $995.

Celestis tried to launch Doohan’s ashes on an earlier SpaceX flight, but the smaller Falcon 1 rocket carrying them in August 2008 failed to reach space. The company offered the reflight for free as part of its guarantee to fly another sample of a person’s ashes if a rocket fails to launch the first time. The May 22 flight was Celestis’ “largest launch event ever,” according to Chafer’s Facebook page.