MOSCOW, MAY 24 -- Soviet President Mikhail Gorbachev told a delegation of Lithuanian legislators today that the breakaway Baltic republic could win independence from the Soviet Union in two or three years if it agrees to suspend its March 11 declaration of immediate secession.

"I came out of that meeting feeling we are getting closer to compromise," said Lithuanian lawmaker Nikolai Medvedev after the hour-long session at the Kremlin. "It was a friendly meeting, and I left there feeling that we will all work this out as free people."

Medvedev said the four-member Lithuanian delegation handed Gorbachev a copy of the Lithuanian parliament's latest resolution offering to freeze some legislation passed after the declaration of independence if Moscow agrees to negotiations on an orderly transition to full sovereignty for the republic.

Gorbachev told the Lithuanians that he was aware of the resolution, but he insisted on a freeze of the independence declaration itself before any talks could begin. Most Lithuanian legislators have argued that since they were elected on independence platforms they could not now vote to suspend the declaration. Lithuanian President Vytautas Landsbergis has contended that a freeze of the declaration would mean that "we admit for the first time that we belong in the Soviet Union. We cannot do this."

Medvedev said he told Gorbachev that Lithuania would have to have a guarantee that a temporary freeze of the declaration "does not become a permafrost, a deep freeze."

What the Lithuanian delegation said it found most encouraging was that Gorbachev spoke in terms of two or three years and made no mention of the country's stringent new law on secession of Soviet republics, which requires carefully circumscribed referendums and a transition period of up to five years. Lithuania, as well as the other Baltic republics, Estonia and Latvia, contend that the secession law does not apply to them because they were never legally a part of the Soviet Union.

All three republics were annexed in 1940 as a result of a pre-World War II agreement between Moscow and Nazi Germany; for 20 years before that, they had been independent states and members of the League of Nations.

But Gorbachev's message to the Lithuanians apparently also included a veiled threat, as the Soviet leader again broached the possibility of imposing direct presidential rule on the republic to bring it to heel, other members of the delegation told the Associated Press. Gorbachev had raised that prospect last month but said such an extreme step would be used only in the event of civil conflict.

Gorbachev did not spell out what measures might be taken under presidential rule, the AP said, but possibilities include forcibly disbanding the Lithuanian parliament, replacing the Lithuanian government with Moscow-appointed officials and imposing martial law.

Meanwhile, the Kremlin's two-month-old oil and natural-gas embargo against Lithuania has pushed the republic into deep crisis. Factories are being shut down for lack of power, public transport is nearly non-existent, hot water has been shut off except in hospitals, and the parliament's anti-embargo committee has estimated that in less than two weeks emergency food centers will be needed for people who are not getting sufficient supplies of milk, meat and other staples.

Soviet Premier Nikolai Ryzhkov, in a speech to the national legislature in Moscow today, mocked the Lithuanian economic situation, saying, "The comrades there told us they could live without the Soviet Union and didn't need our help. We just cut off energy supplies, that's all. It is very important that the people in Lithuania feel how it is to live without the help of our interdependent family."

The Lithuanian issue is likely to loom large at next week's summit meeting between Gorbachev and President Bush in Washington. The Senate already has recommended to the White House that it not grant the Soviet Union trade priority as a "most-favored nation" until the Kremlin calls off its energy embargo against the republic.