(CNN) -- In the end, it was Scotty who got beamed up.
The ashes of late actor James Doohan, who played chief engineer Montgomery Scott in the original "Star Trek" television series and a series of subsequent films, were on the SpaceX rocket that launched a private spacecraft into orbit this week.
Doohan's character was referenced in the "Beam me up, Scotty" catchphrase associated with "Star Trek."
In various versions of the command, Capt. James T. Kirk, played by William Shatner, would ask his Scottish-descended colleague to activate a matter teleportation device that would transport Kirk or others to the starship Enterprise.
While it is unclear if the exact phrase "Beam me up, Scotty" ever was uttered in a "Star Trek" episode, it became a popular bumper sticker and Doohan chose it for the title of his autobiography published in 1996. He died in 2005.
Celestis, a company that provides memorial spaceflights, confirmed that some of Doohan's cremated remains were among 320 sets on the SpaceX Falcon 9 rocket launched Tuesday.
In addition, a portion of the cremated remains of Mercury 7 astronaut Gordon Cooper also were on board, the company confirmed.
The Falcon 9 rocket, which carried up the SpaceX Dragon craft for a possible rendezvous this week with the International Space Station, is expected to remain in orbit for months until burning up when it falls back into the Earth's atmosphere.
"He would rather have flown when he was alive, of course," said Doohan's widow, Wende Doohan, who watched the SpaceX launch Tuesday with the couple's 12-year-old daugher, one of three children from a 31-year marriage.
Doohan always told her he wanted his ashes flown in space, she said Thursday, adding that the contract with Celestis was not signed until after Doohan died.
"He was this enormous fan of technology, future technology, space exploration, NASA and anything with mankind reaching out," Doohan said.
Doohan and Cooper's ashes also were launched in 2007, but that flight failed to make it into space.
Charles Chafer, the CEO of Celestis, said Thursday the remains aboard the Falcon 9 rocket came from 18 countries and included many people linked to the space industry, such as workers on the Apollo program.
According to Chafer, another celebrity whose remains were included was Randy VanWarmer, who wrote the song "Just When I Needed You Most." VanWarmer died of leukemia in 2004, Chafer said.
A common theme among those on board was their interest in traveling in space when alive, Chafer said, adding "but there's also a bunch of folks sort of new age; they wanted to be part of the universe."
In Doohan's case, timing led his acting career to the stars instead of the depths of the ocean, according to his widow. He read for parts on both "Star Trek" and "Voyage to the Bottom of the Sea," and got a call back first from "Star Trek" producer Gene Roddenberry, she noted.
"No one would know him today if he'd gotten the other call first," she said.