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.

¡°Prosecutors are systematically ignoring my complaints including about an incident in which one pretrial detention guard forced me to my knees and another put a gun to my head,¡± Interfax quoted him as saying.

Whelan was detained by agents from Russia¡¯s Federal Security Service in a Moscow hotel room on Dec. 28 after a Russian acquaintance gave him a flash drive, which his lawyer said he thought contained holiday photos but that actually held classified information.

At the hearing Thursday, Whelan held up a handwritten note in which he said his life was being threatened in custody and that medical care was being denied to him.

¡°I am innocent of a crime that never happened,¡± it said.

¡°Russia says it caught James Bond on a spy mission, in reality they abducted Mr. Bean on holiday!¡± the note said.

Outside the court, Whelan¡¯s lawyer, Vladimir Zherebenkov, told reporters that Whelan had complained about an incident with a prison guard that arose in the exercise yard two weeks ago. He gave no details, but said the guard had been docked wages over the incident.