Jewish activist Anatoly Scharansky, denied permission to emigrate to Israel and arrested last year on treason charges, was convicted in a court here yesterday and sentenced to 13 years imprisonment and hard labor.

The court found Scharansky guilty of spying for the United States and of anti-Soviet agitation, but the 30-year-old dissident in a statement before the verdict said the charges were "absurd" and defiantly asserted his role in "the process of liberation of Jews of the U.S.S.R."

For more than 2000 years my people have lived in Russia," he said. "But wherever the Jews went, every year, they repeated "Next year in Jerusalem!" Now as never before I'm far from my people, from (my wife) Avital, and I'm facing long and hard years of detention.

"I say, addressing my people and my Avital "Next year in Jerusalem!" To the court which is going to pronounce the verdict already prepared, I have nothing to say."

Scharansky's brother Leonid, the only relative allowed inside the courtroom, recounted these remarks to friends, supporters and foreign journalists on a rainswept sidewalk outside the court as his mother, Ida Milgrom, 70, and many in the crowd wept openly.

In this emotionally charged atmosphere, the group of about 70 sympathizers - many of them like Scharansky, Jews refused permission to emigrate - began to sing in unison the Israeli national anthem Hatikvah (Hope). At the same time, the massed police, KGB plainclothesmen and government supporters who all week have clogged the narrow street behind the courthouse laughed and jeered.

The sentencing of Scharansky climaxed with the round of Soviet political trials that have outraged America and drawn denunciations throughout the West. President Carter had personally denied the charges that Scharansky had spied for the Central Intelligence Agency.

Along with finding Scharansky guilty of espionage for his contacts with American journalists here, the Supreme Court of the Russian Federation also convicted him on charges of anti-Soviet agitation and propaganda.

The latter charges were based on Scharansky's work with a Moscow group founded to monitor Soviet compliance with international human rights agreements and his attempts to discuss the Kremlin's Jewish emigration policies with various members of the U.S. Congress.

Scharansky, a computer programmer, is to serve a seven-sentence for anti-Soviet agitation concurrent with the 13-year treason sentence.

Although Scharansky could have received a death sentence, the prosecution asked for 15 years imprisonment. Soviet authorities seemed to underline this relative leniency yesterday following the Scharansky verdict with the announcement that another Soviet citizen, Anatoly Filatov, had been sentenced by a military court to be shot for treason.

Scharansky, who was arrested in March 1977, in the first wave of a activists that has culminated with four trials in the past two months, is to spend the first three years of his sentence in a prison cell - the harshest form of confinement in the Soviet Union.

The remaining ten years are to be spent in a prison camp at hard labor. The so-called "strict regime" in these camps involves reduced food rations and minimal contracts with family and the outside world.

As a closed police van sped Scharansky asserted that the KGB this spring offered to let him emigratte and joinn his wife Avital in Israel "If I agreed to cooperate with the investigation with the aim to liquidate the Jewish emigration movement."

He refused, he said.

I'm happy that I lived honestly and in peace with my conscience and never lied even when threatened with death," he said. Avital was allowed to leave one day after their 1974 marriage.

He said he was proud to have worked with Yuri Orlov and Alexander Ginzburg, who co-founded the Helsinki human rights monitoring group. They have both been convicted and sentenced for anti-Soviet agitation. The ailing Ginzburg was convicted Thursday in Kaluga and sentenced to eight years of hard labor.

Orlov was sentenced in May to seven years labor plus five years internal exile. The three were arrested in the spring of 1977 in the government's move to suppress human rights advocates, whose activities have drawn support from President Carter.

Scharansky also spoke of pride in working with Andrei Skharov, the well-known dissident who won the 1975 Nobel Peace Prize for his activities. These three, Scharansky said are "followers of traditions of Russian intelligentsia."

As the sentence was pronounced the state-chosen spectators packing the courtroom applauded amid cries of "It serves him right!" and "He should have more!" Leonid Scharansky said he stood up in the audience and shouted at Anatoly, "Tolya, the whole world is with you!" He said he was prevented from saying more by men who grabbed him..

Sakharov, who spent the four days of Ginzburg's trial trying to be admitted, declared as he awaited the Scharansky verdict, "I haven't words to express my grief and indignation over this injustice and illegality. The whole world is watching." Decrying the refusals to permit Milgrom into court, he declared, "What's happening now is pure sadism, a mockery of a mother's feelings.

"We should be strong, nothing should change our souls. Our attitudes toward this country . . . in this terrifying atmosphere of provocation, cruelty arbitrary willfullness and illegality . . . are the same - to detente, to world peace, to save the world from nuclear catastrophe."

Sakharov is now the best-known dissident still free, in part because of his membership in the prestigious Soviet Academy of Sciences. The future shape of dissent here, many say, may hinge on whether the government moves to fully suppress Sakharov, who has been severely harassed in recent years.

As he argued to get Milgrom into court, he shouted at police, "You are not humans, you are fascists. Hear me, a member of the Academy of Sciences - you are fascists."

Carter's advocacy has buoyed the dissidents despite the fates of Orlov, Ginzburg, Scharansky and Vladimir Slepak, a well-known Jewish activist who recently was sentenced to two years exile for malicious hooliganism.

Milgrom yesterday sent a telegram to Carter declaring in part, "my son is innocent, and has been condemned only because he could not be indifferent to the sufferings and cries of other people and because he struggled actively for his right and the rights of all Jews who wanted to live in Israel with Jewish people. Through all these difficult days , your sincere and authoritative voice in defense of an innocent man has reached me, Mr President, Please accept our profound and heartfelt gratitude."

When the van carrying Scharansky drove off, she was still being stalled by official promises she would see her son soon.

"They lied to the last moment, complete lies. Never was I told the truth," she said.

Pravda and other major newspapers will report the Scharansky-Filatov spy treason trials, emphasizing that Scharansky, with a much lighter sentence, is defended in the West as a human rights figure.

"Anti-Communists and oppenents of detente used the trial of the exposed spy to sow animosity to the Soviet Union hypocritically sheeding tears over the justly convinced criminal."

In keeping with the official handling throughout this week, the article does not mention by name either the country or the spy contacts here that Scharansky allegedly worked for. This treatment is markedly more restrained than the original Izvestia attack last year naming U.S. diplomats and reporters as spies with Schransky and other Jews to betray Soviet defense secrets.

The Izvestia article set a tone indicating the Scharansky trial could be the most shrill anti-U.S. show trial since the 1960 trial of downed U-2 pilot Francis Gray Powers.

Some have suggested that the official treatment indicates that the Kremlin, while scheduling the Ginzburg and Scharansky trials to coincide with important bilateral strategic arms talks this week, still sought restraint in handling an internal issue of paramount importance to the leadership - however repugnant in the West - to avoid further damaging U.S.-Soviet relations.