A former U.S. Marine held in Russia on suspicion of spying told a court Thursday that a prison guard had forced him to his knees in custody and that he had been threatened with a gun, the Interfax news agency reported.

Paul Whelan, who holds U.S., British, Canadian and Irish passports, was detained in December and accused of espionage. Moscow says he was caught red-handed, but he denies the allegations and says he was set up in a politically motivated sting.

At a hearing Thursday, the court ordered Whelan held in custody until Dec. 29. Whelan, who appeared in court in a cage, accused the court of ignoring evidence of abuses against him and asked for the judge to be replaced, but his appeal was rejected.