MOSCOW — Paul N. Whelan, a former United States Marine who has been jailed in Russia for eight months on espionage charges, said on Friday that prison guards had injured him.

The remarks came during a court hearing on whether to extend his detention in Moscow’s notorious Lefortovo Prison, which began in late December. The court ordered him held for another two months.

“The prosecutor’s office also knows that I was injured by security guards in the pretrial detention center,” Mr. Whelan was quoted as saying by Interfax, a Russian news agency, adding that he was in “great pain.”

“Even Salem witches had more opportunities to defend their rights,” Mr. Whelan told the court.

The judge in Lefortovo District Court dismissed his request that the prosecutor be changed, but summoned an ambulance for a doctor to examine him.