By PATRICK REEVELL, ABC News

(MOSCOW) — A Russian court sentenced a historian who helped uncover mass graves from Stalin’s “Great Terror” campaign to 3 1/2 years in jail, on charges widely criticized by rights groups as fabricated and viewed as part of an effort by Russian authorities to whitewash dark chapters of the country’s Soviet history.

However, the historian, Yuri Dmitriyev, avoided what his supporters had feared would be a much longer prison term. Prosecutors had sought a 15-year jail sentence for Dmitriyev but the court’s decision means that because of time already served, he will be released in November.

Dmitriyev, 64, heads a local branch of Memorial, a human rights group that commemorates the victims of Soviet repression. He has faced criminal prosecution since 2016, when he was accused by police of taking pornographic photographs of his adopted underage daughter.

A court in April 2018 acquitted Dmitriyev of the charges, but a higher court overturned the ruling and ordered further investigation. In 2018, police brought the case once again and added a fresh charge alleging he had violently sexually abused his daughter. Dmitriyev was arrested and placed in pre-trial detention.

An expert witness told the court the photographs were not pornographic and that psychological evaluations have shown no evidence that Dmitriyev is a pedophile. Dmitriyev said he took the photos to document the girl’s health in order to prove to child welfare officers she was well-cared for.

International and Russian human rights groups have condemned the trial as an attempt to smear one of the country’s most prominent researchers of mass graves of victims murdered under Joseph Stalin.

On Wednesday, the court in the Karelia region where Dmitriyev lives, convicted him on the charge of violent sexual abuse, handing down the 3 1/2-year sentence. But it acquitted him on the original pornography charges.

Dmitriyev’s supporters expressed disgust at the court’s decision but hailed it as a victory because he will be freed soon.

“The absolute groundlessness of the accusations was obvious from the very start. And such a sentence for such a grave accusation means one thing: that there is no evidence of Dmitriyev’s real guilt,” Memorial wrote in a statement.

“Nonetheless, these accusations have already taken more than three years of Yuri Dmitryev’s freedom and crippled the fate of his adopted daughter,” the statement continued.

“By today’s standards this is as good as them acquitting him,” Evgeny Roizman, a prominent opposition politician wrote on Twitter.

Dmitriyev’s case has attracted international criticism. Human Rights Watch has previously called the charges “bogus.” In May, the British government said it was “deeply concerned” by his detention.

Dmitriyev’s prosecution has coincided with an effort to alter the history of the grave sites in his region, Karelia, which borders Finland.

In the 1990s, Dmitriyev and others discovered a number of mass graves linked to Stalin’s Gulag prison system in Russia. One grave site in Sandarmokh contained the bodies of over 6,000 prisoners murdered by Soviet secret police during the “Great Terror” (also known as the “Great Purge”) between 1937-38.

But in recent years, there has been an effort by a state-backed group to suggest that the Sandarmokh graves also contain the bodies of Red Army prisoners of war executed by Finnish troops during World War II.

The theory is being promoted by Russia’s Military-Historical Society, an organization known for its nationalist outlook and whose members include many senior Russian government officials. In 2018, members of the organization dug in the graves and found 16 soldiers’ corpses which they believe proves that Soviet secret police were not the only ones involved in killing at Sandarmokh.

Critics say the effort is meant to muddy the waters around the graves and take focus away from the Stalinist mass killings. It comes against the backdrop of a wider campaign under President Vladimir Putin in the last several years to downplay the importance of Soviet crimes in Russian history and rehabilitate Stalin’s image.

Memorial has faced a series of dubious criminal investigations in recent years. Last year, Memorial activists in Perm, located in central Russia, were accused by police of “illegal logging” for cutting away brush around a cemetery where Lithuanians and Poles displaced under Stalin are buried. The organization, which also campaigns against present-day abuses, has also seen its offices raided and its members have faced intimidation.

Copyright © 2020, ABC Audio. All rights reserved.