MOSCOW - The Supreme Court ruled in favor of full rehabilitation for the last czar, Nicholas II, and his family on Wednesday, officially recognizing the Romanovs as victims of "unfounded repression" 90 years after they were executed.

Soviet historians constructed accounts that blamed Nicholas for famines, wars and social collapse. But as Russian nationalism strengthened after the fall of the Soviet Union, he is increasingly depicted as a thwarted visionary and a beacon of the Orthodox faith.

The church, which canonized the Romanovs as martyrs in 2000 and was itself persecuted in the Soviet era, welcomed the court's decision. "It is an important step to remove from our history the heavy burden of this crime against the czar's family," said the Rev. Vsevolod Chaplin, a church spokesman. "More and more people are becoming free of the sharp cliches that were imposed in the recent past."

In July 1918, on Lenin's orders, the czar, his wife, Alexandra, and their children, Olga, Tatiana, Marie, Anastasia and the 13-year-old heir to the throne, Alexei, were shot to death in the basement of a house in Yekaterinburg, a city in the Ural Mountains in central Russia. The Bolsheviks also murdered the family's staff, as well as Anastasia's pet cocker spaniel Joy.

"This decision shows the supremacy of law and the victory of justice over evil and tyranny," said German Lukyanov, the attorney for Grand Duchess Maria Vladimirovna, 55, who first filed a suit for the rehabilitation of her family three years ago.

Edvard Radzinsky, a historian and the author of "The Last Tsar: The Life and Death of Nicholas II," pointed to a current anomaly.

"We have two graves that symbolize the revolution: the dirty hole into which the Romanovs were thrown, and the mausoleum of the one who ordered this," he said, referring to Lenin's tomb on Red Square.

"The closing of the first grave," he said, "should lead to the closing of the second."