A former U.S. Marine held by Russia on espionage charges urged President Trump and other world leaders to "intervene quickly" as his detention was upheld by a Moscow court on Tuesday. The Moscow City Court denied the appeal of Paul Whelan, a 49-year-old Michigan resident, and his defense team filed against an August ruling to extend his pre-trial detention until October 29.

As the judge read the verdict, Whelan gave a short speech from a glass defendant's dock, insisting on his innocence and calling the allegations against him "nonsense." He also pressed a hand-written note against the glass that said, "I am innocent of the charge. I am not a spy. I did not ask for or receive secrets. My work has never included defense department interaction. Medical treatment is being refused, a doctor assaulted me. This case is an absurd provocation. No evidence of crime exists."

Whelan, who also holds British, Canadian and Irish citizenship, also called on "leaders in the governments in Ottawa, Dublin, London and Washington, as well as the United Nations, to intervene quickly!"

Get Breaking News Delivered to Your Inbox

Whelan was arrested in a hotel room in Moscow at the end of December and charged with espionage. He faces up to 20 years in prison in Russia. Whelan's Russian lawyer, Vladimir Zherebenkov, told CBS News outside the court in February when Whelan was arraigned that his client was found at his hotel with a flash drive containing Russian "state secrets," Zherebenkov has maintained that his client was handed the flash drive and didn't know that it contained any classified information.

The lawyer has not explained in detail how Whelan obtained the information on the drive but said his client wasn't aware that the Russian government considered the material sensitive. Zherebenkov added that the prosecution did not "have strong evidence to back up the charges" against Whelan.

Former U.S. Marine Paul Whelan, who was detained on suspicion of spying, stands inside a defendants' cage as he attends a court hearing regarding the extension of his detention, in Moscow, Russia, May 24, 2019. REUTERS

U.S. intelligence and State Department sources have told CBS News they're confident Whelan is not a spy. The investigation of Whelan's case wrapped up in late August. His lawyers are now studying the case files and preparing a defense for the trial, which is expected to start in January 2020. After a court hearing in August, Zherebenkov told reporters that "latest investigation findings are in favor of the defense. "

"Paul's version about being set up adds up," Zherebenkov said. "Right now the evidence the prosecution has is more damaging [to their own case] than it was in the beginning."

Elizabeth Palmer contributed to this report.