Mr. Dmitriev has devoted the past 30 years to a search for mass graves of victims of Stalin’s purges. Together with his colleagues from Memorial, one of Russia’s oldest and most respected human rights organizations, in 1997 he discovered Sandormokh, where the remains of more than 9,000 victims were buried in communal pits.
Over the years, the site has been transformed into a memorial with several monuments and a small wooden chapel. A day of remembrance is celebrated at Sandormokh every year on Aug. 5.
Nikita S. Khrushchev famously denounced Stalin in a 1956 speech to a Communist Party gathering in which he detailed the dictator’s crimes. After the fall of Communism, a more honest examination of Soviet history was tolerated, though not always encouraged.
So at first, the local government supported the effort, with officials attending the memorial events. But official attitudes have been changing lately, particularly as Russia and the West have descended into a new Cold War prompted by the annexation of Crimea and the conflict in Ukraine.
Last year, President Vladimir V. Putin, who has made the rebuilding of national Russian pride a cornerstone of his rule, said that “excessive demonization of Stalin is one of the ways to attack the Soviet Union, Russia.”
As state-owned television channels began to glorify the Soviet past and promoted the image of Russia as a besieged nation surrounded by enemies, memories of past crimes committed by the Soviet state were suddenly unwelcome.
“The authorities thought, ‘Why do so many people come to Sandormokh every year to pay tribute to victims of Stalin’s purges,’ ” said Anatoli Y. Razumov, another Gulag historian and Mr. Dmitriev’s friend. “A decision was made to silence the sites of Soviet crimes.”
At the end of December, Aleksandr V. Bortnikov, the head of Russia’s Federal Security Service, a successor to the Soviet K.G.B., said in an interview to Rossiyskaya Gazeta, a government-run daily newspaper, that “archive materials show that there was an objective side in a significant number of criminal cases” opened during Stalin’s purges.
Months before Mr. Dmitriev’s arrest, a number of government-friendly news outlets published articles by historians who suggested that Sandormokh could also be the site of a mass execution of Soviet Army servicemen by the Finns.
Mr. Razumov, among other historians, disputed the Finnish theory, saying that a similar tactic was used by the Soviet authorities when they tried to hide their crimes in the Katyn forest massacre and at other burial sites.
Near the Russian city of Perm, a museum of a Soviet forced labor camp was replaced by a state-run museum, and an annual memorial event was diluted.
In this toxic atmosphere, Mr. Dmitriev’s life’s work became increasingly problematic to the authorities. Despite testimony in his favor by his adoptive daughter and a parade of writers, actors, musicians, the court declined to throw out the case.
Viktor M. Anufriev, Mr. Dmitriev’s lawyer, said that someone in the government was refusing to let the case against Mr. Dmitriev be dismissed.
“There is some force that wants to get the desired result,” Mr. Anufriev said. “Also, they kept him behind bars for a year. Someone will have to respond in case the charges will fall through.”