MOSCOW, OCT. 12 -- In a court case without precedent in the Soviet Union, a militant nationalist Russian was sentenced today to two years at hard labor for stirring up ethnic hatred at a time of increasing Soviet antisemitism.

Konstantin Smirnov-Ostashvili, 54, a leader of the right-wing Pamyat Society, was convicted of leading an attack on Jewish writers. He was the first person prosecuted under a Soviet law intended to ensure racial harmony among the country's 100 or more ethnic groups.

"In making the decision on punishment, the court has taken into account that the crime committed is notable as a great danger to society," Judge Andrei Muratov said in sentencing Smirnov-Ostashvili.

The trial, sensational and often raucous, lasted for almost three months and became the focus of a struggle between Russian supremacists and political liberals as well as a demonstration of government concern over the rise in antisemitism.

As the judge read out the verdict, Smirnov-Ostashvili's supporters stood on benches in the courtroom and unfurled banners, one of which bore the message, "Court -- are you serving the law or Zionism?"

Smirnov-Ostashvili, a factory worker, was on trial for organizing a group of Russian nationalists who broke up a liberal political forum at the Central House of Writers in January. The intruders roughed up the participants, shouting, "Go to Tel Aviv" and "Yids."

No one was seriously injured, and Smirnov-Ostashvili, who used a megaphone to shout down the speakers at the forum, was the only person charged after a lengthy investigation by police.

The trial, which began July 24, was nearly as chaotic as the political forum. Smirnov-Ostashvili and his supporters interrupted the judge, screamed at witnesses, berated lawyers and used the courthouse for impromptu political rallies.