THE secret to one of illusionist David Copperfield’s most famous tricks has been revealed as he faces court in a negligence lawsuit brought by an injured audience member.

Jurors got a rare behind-the-scenes look at his famous ‘Thirteen’ disappearing act during testimony in the case involving a British man who claims he suffered brain and other injuries when he fell while participating in a 2013 Las Vegas show.

The magician’s friend and executive producer, Chris Kenner, revealed to jurors the mystery behind a signature Copperfield illusion that appeared to make a group of audience members vanish together onstage.

After the randomly chosen audience members are placed in chairs on a platform and a curtain covers them, practised stagehands with flashlights hurry the participants down through dark curtains, down unfamiliar passageways, around corners, outdoors, indoors and through an MGM Grand resort kitchen in time to re-enter the back of the theatre for their “reappearance” during the show finale, Kenner testified.

“Is that route an obstacle course?” asked Benedict Morelli, lawyer for Gavin Cox, a resident of Kent, England, who claims lasting brain and bodily injuries from his fall have cost him more than $US400,000 ($514,260) in medical care.

No, said Kenner, whose company, Backstage Employment and Referral Inc., is also a defendant in the case.

Copperfield’s lawyers lost pre-trial bids to close proceedings to the public to avoid giving away performance secrets.

MGM Grand Hotel lawyer Jerry Popovich said the illusion is no longer used to close the show.

Morelli asked Kenner whether stagehands and Copperfield visually assessed the physical fitness and footwear of audience members randomly picked to participate in the trick dubbed “the run-around.”

Magicians, media members and lawyers were disqualified to protect the secrecy of the trick that Kenner estimated Copperfield performed tens of thousands of times over 20 years.

“At no time are they told what they’re going to do before they start this illusion,” Morelli asked Kenner.

“They’re told as they’re running the route, correct?” Yes, Kenner replied.

Kenner declined to say it was dangerous to lead people along a dark and unknown route over changing floor surfaces of linoleum, cement, carpet, sidewalk and tile.

The lawyer noted that before Cox fell, the group hustled through an alley coated with what Morelli called construction dust.

Popovich told the jury of eight women and four men last week that 10 minutes before Cox fell, Copperfield safely walked through that same area as part of another illusion that did not involve audience participation.

The MGM Grand lawyer said Copperfield would have alerted stagehands if he noticed any problems along the way.

Cox and his wife, Minh-Hahn Cox, are seeking unspecified damages in the negligence lawsuit.

Cox was plucked from the audience for Copperfield’s disappearing act — but when assistants hustled him through a darkened, secret passageway he tripped and fell on construction debris, slamming his head into the floor.

He suffered a traumatic brain injury, had two fusion surgeries on his neck and shoulder surgery.

“People were saying to him, ‘Mr. Copperfield, this man’s been hurt,’ ” Cox told The Post. “And Mr. Copperfield looked at me and smirked. He just walked away. He never showed any concern for me.”

Cox, who once cooked for British royalty, said he can’t even bake a muffin now.

It’s turned my life upside-down,” he tearfully said of the incident. “I have pretty much constant pain, and my difficulty is my short-term memory.”

“I have a ventilator,’’ Cox added. “Otherwise, I stop breathing at night.”