Something rather unfortunate happened to 81-year-old actor William Shatner recently. You might even say he lost his pants.

"My wardrobe malfunction @ LAX is making the rounds online," he said Thursday night on his Twitter account. "For those that were witness I apologize. For those that kept staring shame on you!"

But he didn't seem too peeved about it while talking about, and reenacting, the horrifying episode with CBS late night talk show host Craig Ferguson earlier in the week.

"Now, remember, I'm going on a long trip to South Africa," he explained. "I'm going to spend 22 hours on an airplane. So I'm wearing very loose clothing. As loose as I can get it. You don't want anything to bind you, because you don't know what it might bind! So... the guy examines me like a pile-driver [and]... my pants fall down. I'm in LAX and my pants are around my knees."

And then he seemed to imply that he wasn't wearing anything underneath.

"Now remember, I'm going to spend 22 hours on an airplane and I don't want anything binding me," he said.

Ferguson's jaw dropped. Looking sincere, Shatner pointed both index fingers at him as the host covered his mouth in shock.

"So, [the TSA agent] has got the wand in his hand and he's looking at me, and he... says, 'Are you carrying a weapon?'" Shatner explained.

"You didn't actually have your junk out there -- you didn't have the full starship out there for everyone to see?" Ferguson asked.

"You can't see a starship at night," Shatner replied. "It just floats through."

"It was awful," he concluded. "It was the most embarrassing thing, probably, that's ever happened [to me]."

This video is from CBS's The Late Late Show with Craig Ferguson, published to YouTube on June 27, 2012.