FILE PHOTO: Historian Yuri Dmitriev accused of using his adopted daughter to produce child pornography, of illegally possessing a firearm, and of depravity, is escorted by a police officer upon his arrival for a court hearing in Petrozavodsk, Russia June 5, 2017. REUTERS/Igor Podgorny

By Andrew Osborn

MOSCOW (Reuters) - A Russian historian whose exposure of Soviet leader Josef Stalin's crimes angered state officials is due to begin enforced psychiatric testing this week amid fears he will be falsely declared insane, his lawyer said on Tuesday.

Yuri Dmitriev, 61, is on trial in northwest Russia on charges brought by state prosecutors of involving his adopted daughter, then 11, in child pornography, of illegally possessing "the main elements of" a firearm, and of depravity involving a minor.

Some of Russia's leading cultural figures say Dmitriev was framed because his focus on Stalin's crimes - he found a mass grave with up to 9,000 bodies dating from the Soviet dictator's Great Terror in the 1930s - jars with the latter-day Kremlin narrative that Russia must not be ashamed of its past.

The narrative has taken on added importance ahead of a March presidential election which polls show incumbent Vladimir Putin, who uses his country's World War Two victory when Stalin was in charge to bolster national pride, is on track to win.

Putin asserted last year that what he called an "excessive demonization of Stalin" was being used to undermine Russia.

Dmitriev faces up to 15 years in prison if convicted of the charges, which he denies.

A previous psychiatric evaluation declared him to be of sound mind and a court-sanctioned expert group found no pornographic content in nine photographs of his daughter that are at the center of the case against him, overturning the earlier findings of other experts commissioned by prosecutors.

But on Dec. 27, in an unexpected twist, the court ordered that the same nine photos be re-examined by experts for a third time. It also granted the prosecution's request that Dmitriev undergo enforced psychiatric testing to determine whether he has "sexual deviations."

However, the court declined a prosecution request to extend his detention beyond Jan. 28.

SOVIET HANGOVER

Dmitriev's lawyer, Viktor Anufriev, told Reuters on Tuesday he had written to the supreme court of Karelia, the region where his client is being tried, to appeal against the court order.

"He's already been through one (psychiatric) test. The conclusions were fine, no evidence of deviance was found, and the results were not contested by prosecutors," said Anufriev.

"This (latest testing) was ordered illegally."

Dmitriev was flown to Moscow at the end of last year to be evaluated at a psychiatric clinic, the Serbsky Centre, that was infamous in Soviet times for providing false testimony to allow the authorities to lock up dissidents in psychiatric facilities.

Anufriev said he expected a doctor to be appointed to handle his client's psychiatric case later on Tuesday.

He said he hoped the evaluation, which could last for up to a month, would be objective, but was concerned that state security officials in Karelia might pressure doctors.

He did not specify which officials he was referring to.

State TV broadcast last year what it billed as an expose of Dmitriev and of Memorial, the organization for which he worked, complaining that foreign money was being used to provide a distorted and overly negative version of Russian history.

The Kremlin has told Reuters it does not get involved in cases like Dmitriev's, while the Investigative Committee of Karelia, whose investigators submitted the original case for prosecution, did not respond to Reuters' questions about whether there was a political side to the trial. They said only that there had been enough evidence to open a criminal case.

Anufriev, Dmitriev's lawyer, said he was worried.

"Perhaps if they can't convict him (of child pornography) they need to declare him insane," the lawyer said. "It's a purely Soviet procedure. Make accusations and then end things by locking someone up in a psychiatric facility."

(Editing by Mark Heinrich)