VILNIUS, U.S.S.R., JAN. 10 -- Soviet President Mikhail Gorbachev issued his most strongly worded threat yet to the breakaway Baltic republic of Lithuania today, telling its leaders that they must "immediately" restore the validity of the Soviet constitution or face the consequences.

Lithuanian President Vytautas Landsbergis promptly rejected Gorbachev's message, declaring that Lithuanian authorities would defend their government buildings from attack. He also appealed to the world community for support, comparing Lithuania's annexation by the Soviet Union in June 1940 to Iraq's occupation of Kuwait.

Today's demand by Gorbachev and its swift rejection by Landsbergis suggested that the 10-month-old drama over Lithuania's reassertion of its pre-World War II independence is approaching a climax. Gorbachev's message could be used to justify the eventual imposition of direct presidential rule in Lithuania and the suspension of the republic's democratically elected parliamentary institutions.

Declaring that the situation had reached a "dead end," Gorbachev accused the Lithuanian leaders of "flagrant violations" of the Soviet and Lithuanian constitutions and of "the people's civil and social rights." He also accused the Lithuanian parliament of attempting to "reestablish a bourgeois regime and order" in place of socialism.

"People are demanding that constitutional order be reestablished, that their security and living conditions be properly guaranteed. They have lost faith in the policies of the present authorities. They demand that presidential rule be established," Gorbachev declared.

Political feeling in the republic of 3.4 million people has polarized over the past few days, with ethnic Russian workers here in the capital calling for presidential rule and the Lithuanian majority demonstrating their support for independence. A nonstop independence rally was in progress outside parliament as tens of thousands of flag-waving Lithuanians responded to radio appeals to protect the building from assault.

In view of the outpouring of nationalist emotion, it seems unlikely that Gorbachev will succeed in imposing his will on Lithuania without significant resistance. Any attempt to take over government buildings could result in bloodshed, despite the obvious disparity in force between Soviet paratroops and the poorly armed Lithuanian defense corps.

The language used by Gorbachev in his catalogue of accusations against Lithuania is reminiscent of the charges brought by former Soviet leaders to justify violent crackdowns in Hungary in 1956, Czechoslovakia in 1968 and Poland in 1981. Gorbachev's record, however, shows that he is extremely reluctant to use force, so there is still some doubt that he will actually carry out his threats.

At a press conference this evening, Landsbergis compared Gorbachev's message with Moscow's ultimatum of June 14, 1940, which paved the way for Soviet annexation of Lithuania. "The only difference is that this ultimatum does not have a date," he said.

The Lithuanian leader said Soviet pressure against his republic coincided with a series of demonstrations by Russians in Vilnius that he charged were designed to "justify military dictatorship." The pro-Moscow Lithuanian Communist Party has said five factories and the state airline Aeroflot have gone on strike to protest steep price rises that were announced by the Lithuanian government Monday but suspended by parliament the next day.

Gorbachev's calculations over whether to impose direct rule on Lithuania are complicated by an internal political crisis that has pitted Landsbergis, who takes an uncompromising view of Lithuanian independence, against the more cautious Kazimiera Prunskiene, who resigned as Lithuanian premier after parliament shelved her price plan. At a press conference this evening, Prunskiene accused Landsbergis of undermining her government and opposing her attempts to open negotiations with Moscow over independence last summer.

In what appears to have been a last-ditch attempt to strike a compromise with the Kremlin, Prunskiene flew to Moscow Tuesday for talks with Gorbachev. She said the Soviet leader had told her: "Go back {to Vilnius}, take care of the situation and restore order so that I do not have to do it myself."

Tonight, Landsbergis's nominee to replace Prunskiene, 40-year-old economist Albertas Simenas, was confirmed by a parliamentary vote of 78 to 1, with 29 abstentions. Simenas, who is close to Lithuania's centrist Social Democratic Party, told journalists after the vote that he plans to devote more attention to domestic problems than his predecessor.

"Nobody else was willing to take the job. Everybody understands that there will be bankruptcy here in two months in any case," said a prominent Lithuanian journalist, Vilius Kavaliauskas. "Simenas is a weak figure. This means that Landsbergis will be his own prime minister."

As the new government was formed, the pro-Moscow Communists stepped up their campaign for a crackdown "before it is too late." On Wednesday, representatives of 16 Communist-backed organizations met in Moscow with Gorbachev aides to call for direct presidential rule here.

"We know that imposing presidential rule is not going to be easy. Physical clashes are quite possible. But we feel that it's necessary to do something now to prevent the situation getting out of hand," said Vladislav Shved, one of the leaders of the pro-Moscow party.

The head of the Lithuanian defense department, Audrius Butkevicius, said a regiment of Soviet paratroops had recently been flown into Vilnius. He said his men have orders to resist any attack on the parliament building by nonviolent means but are prepared to use small-arms fire to defend themselves as a last resort.

"We are not going to allow 1940 to repeat itself. First there will be passive resistance, and then there could be fighting," said Gedaminas Jankus, a playwright who heads a group of independence activists called the Union of Lithuanian Riflemen.