David Copperfield was forced to shatter his most famous illusion.

The famed magician was ordered in court Tuesday to break the Magicians Oath in court Tuesday, the BBC reported. A judge ordered Copperfield to explain one of his most famous tricks -- the Lucky #13 -- during a trial involving a man who claimed he was injured during the stunt.

British tourist Gavin Cox, 58, filed a negligence lawsuit against the illusionist, Time reported. Cox claimed he fell while participating in the Lucky #13 trick at the MGM Grand Resort and Casino in Las Vegas in 2013, the BBC reported. In the trick, Copperfield makes 13 audience members, chosen at random, disappear on stage and then reappear at the back of the room, the BBC reported.

Cox told NBC News that he has suffered chronic pain and brain injury and has spent more than $400,000 on medical bills.

Copperfield’s attorney argued that revealing the secret would be financially detrimental, but a Las Vegas district court ruled against the magician

A Las Vegas district court rejected Copperfield’s defense, which argued that disclosing the secret behind the trick would be financially detrimental to him. He was ordered to explain how the trick was done.

Spoiler alert: Copperfield’s executive producer testified that when the curtain falls, the 13 volunteers are taken through passageways that circle the MGM building. They exit the building and then re-enter at the back of the theater, Time reported.

“There was a duty by the defendants to provide a safe environment to the audience participants,” Cox’s lawyer, Benedict Morelli, said in the opening statements.