Whenever Captain Kirk, Mr. Spock and other members of the “Star Trek” crew got themselves into a jam, engineer James Montgomery Scott, a.k.a. Scotty, was always at the ready to beam the back aboard the Enterprise.

The actor who played Scotty in the original series and on the big screen, Vancouver-born James Doohan, passed away in 2005. However, according to a new interview, it appears that death was not the end of Doohan’s journey.

In an interview with The Times, video game developer Richard Garriott revealed for the first time ever how he was able to smuggle Doohan’s ashes onto the International Space Station when he spent 12 days in orbit as the world’s sixth-ever “space tourist.”

RELATED: The Future Is Uncertain In ‘Star Trek: Discovery’ Season 3 Trailer

“It was completely clandestine,” said Garriott, revealing his mission was at the behest of Doohan’s family, who wanted to fulfill the late actor’s wish to have his remains make it to the final frontier.

“His family were very pleased that the ashes made it up there but we were all disappointed we didn’t get to talk about it publicly for so long. Now enough time has passed that we can,” he explained.

According to The Times, a 2007 attempt to send some of Doohan’s ashes into orbit on a suborbital rocket failed. That was when Doohan’s son, Chris, contacted Garriott, days before he was scheduled to embark on a $30 million missing to spend 12 days aboard the ISS, via a Russian Soyuz capsule.

“I said, ‘I’m in quarantine in Kazakhstan… but if you can get the ashes to me, I’ll find a way of getting them aboard.’ A couple of days before flight, this package arrived and I made a plan,” Garriott said.

RELATED: ‘Star Trek: Discovery’ Introduces Non-Binary And Transgender Characters

He printed three cards with Doohan’s photo on them, sprinkling ashes inside and then laminating them. He then hid the cards within the flight data file, which was cleared for the flight (the cards were not).

“Everything that officially goes on board is logged, inspected and bagged — there’s a process, but there was no time to put it through that process,” he said.

“The concern afterwards was that it could disrupt relations [with the Russians] because I didn’t have permission . . . so in an abundance of caution I was asked to tell the family ‘Let’s not make a big deal out of it publicly’.”

The late actor’s son, Chris Doohan, confirmed Garriott’s cloak-and-dagger tale.

“Richard said, ‘We’ve got to keep this hush hush for a little while,’ and here we are 12 years later.  What he did was touching — it meant so much to me, so much to my family and it would have meant so much to my dad,” he said. “My dad had three passions: space, science and trains. He always wanted to go into space.”

According to Garriott, one of the cards is on display in Chris Doohan’s home, while another was sent floating in space, where it would have inevitably burned up when re-entering the Earth’s atmosphere.

RELATED: William Shatner Says He Doesn’t Watch ‘Star Trek’ And Hasn’t Seen ‘Picard’ Spin-Off

The third card, however, remains in the ISS, hidden beneath the cladding on the floor of the space station’s Columbus module, where Garriott hid it.

“As far as I know, no one has ever seen it there and no one has moved it,” he said. “James Doohan got his resting place among the stars.”

Since being hidden in the ISS, Doohan’s ashes have travelled nearly 1.7 billion miles through space, orbiting Earth more than 70,000 times.