MOSCOW (AP) _ The Soviet Supreme Court today convicted Mathias Rust on all charges stemming from his dramatic flight to Red Square and sentenced the West German teen-ager to four years in a labor camp.

Judge Robert Tikhomirnov said the 19-year-old pilot's unauthorized flight across more than 500 miles of Soviet territory in May was motivated by ''adventurism'' and ''self-advertisement.''

The judge said Rust would be sent to a labor colony, but gave no other indication of where he would serve his sentence.

Rust, who earlier today had appealed for leniency, reddened slightly when the judge read out the verdict at the end of a three-day trial. His mother Monika's face appeared to stiffen as the sentence was read.

Rust spoke briefly with his parents and younger brother in the courtroom before two Soviet soldiers led him away.

In Bonn, a Foreign Ministry spokesman said officials there did not yet know the legal grounds for the verdict, and had requested this information from the West German Embassy in Moscow.

The ministry also requested the embassy to advise what steps should next be taken on behalf of Rust, said Foreign Ministry spokesman Reinhard Bettzuege.

Diplomats in Moscow have speculated that Rust could be expelled before serving some or all of his sentence. But there has been no official indication on the fate of the young pilot.

The official Tass news agency reported that the sentence is final and not subject to appeal by either Rust or the prosecutor.

The judge said Rust would serve his time in a ''general regime'' labor camp, the least severe of the four levels of Soviet labor camps.

Rust was found guilty of violating international flight rules, illegally entering the Soviet Union and hooliganism. Tikhomirnov gave Rust the stiffest sentence, four years, for the charge of malicious hooliganism, the one charge of three that Rust had contested.

''Rust, most of all, was governed by adventurist intentions,'' the judge said. ''He was striving for popularity and self-advertisement.''

Rust received a two-year sentence for violating the Soviet border and three years for breaking international flight rules. The sentences are to be served concurrently.

Prosecutor Vladimir Andreyev had asked for an eight-year term, and Rust's Soviet defense attorney, Vsevolod Yakovlev, had sought the minimum sentence of a fine or one year in labor camp.

Tikhomirnov told the packed courtroom that testimony from a West German tourist and Rust's lack of social activity before the flight showed he was guilty of malicious hooliganism.

The tourist said in written testimony submitted Thursday that Rust told him shortly after he landed on Red Square that he had made the flight for ''the sake of a joke.''

Rust denied he had said that.

The judge also noted that Rust ''never before took part in social action'' and was far removed from politics before he made his flight.

Rust has been jailed at Moscow's Lefortovo prison since May 28, right after ending his unhindered flight from Helsinki, Finland, by buzzing Lenin's mausoleum and other Kremlin landmarks then setting down on crowded Red Square.

His flight in a single-engine Cessna created headlines around the world and made him a folk hero in West Germany. But it embarrassed the Kremlin and caused a military shakeup, including dismissal of air defense forces commander and the forced resignation of Defense Minister Sergei L. Sokolov.

Rust said he sought East-West disarmament and an audience with Soviet leader Mikhail S. Gorbachev, but prosecutor Andreyev said he wanted only ''cheap popularity.''

Andreyev accused Rust of endangering hundreds of passengers on airliners nearing Moscow's Sheremetyevo International Airport, and said there could have been a dangerous international incident if Soviet forces had shot him down.

Earlier today, Rust appealed for leniency and said that if he received a light sentence, ''I'll never betray the court's trust, never in my life.''

''I never realized then what I did. Today I know,'' Rust told the court in his final statement. ''I made a huge mistake and the only thing left to do is to express my remorse and deep repentance.''

Yakovlev argued that Rust was a naive youth who realizes he made a big mistake.

In West Germany, Guenther Fietz, an official at Aeroclub Hamburg, the school where Rust learned to fly, said:

''Of course we don't support what he did. But all of us were hoping it would be less.'' The club owns the plane that Rust flew to Moscow.