MOSCOW, OCT. 21 -- The images of a country in the grip of a political and economic crisis remain fresh in the mind: endless lines, wildcat strikes, a collapse in the authority of the Communist Party, food shortages, the printing of worthless money, sharp falls in production, mysterious military maneuvers.

For a Western correspondent who covered the rise and temporary fall of Poland's Solidarity movement in 1980-81, the jittery mood in Moscow these days is eerily familiar. The combination of fevered political debates, economic disintegration and increasing weariness of ordinary people is reminiscent of the atmosphere in Warsaw in the weeks before Gen. Wojciech Jaruzelski imposed martial law.

There are, of course, great differences between Poland then and the Soviet Union now. Unlike Jaruzelski in 1981, Mikhail Gorbachev does not have Big Brother breathing down his neck, demanding that he take action against the "enemies of socialism." Furthermore, the Soviet president is a keen student of history whose political philosophy has been molded by a determination to avoid repeating the mistakes of former Communist leaders.

What makes the Polish experience relevant, however, is the way it illustrates the dilemma confronting unpopular governments at a time of economic collapse. In the Soviet Union today, as in Poland in 1981, the increase in personal incomes has by far outstripped the country's productive capacity. In order to bring the two back into line, drastic austerity measures have become inevitable. The necessary sacrifices can be extracted from the population in one of two ways: by force or by agreement.

In December 1981, Jaruzelski chose force. He did nothing to resolve Poland's underlying problems, but he did manage to stave off complete political and economic collapse. Strikes were forcibly suppressed, demonstrations banned, dissidents imprisoned. On the day after martial law was declared, food began reappearing in the shops. Economic activity was stabilized at a very low level. A discredited regime won an eight-year political reprieve.

In January 1989, Jaruzelski chose the way of agreement. He invited his political opponents to talks on Poland's future. Elections were held, in which the Communist Party was roundly defeated. A new Solidarity-led government, enjoying popular confidence, began building a market economy on the ruins of central planning. Living standards declined sharply and unemployment soared -- but most Poles accepted the sacrifices because, at long last, they saw a way out of the crisis. The logical conclusion of this phase: Jaruzelski's own resignation as president.

It is still unclear which of these two paths Gorbachev will end up following, if forced to make the choice. Over the past year, he has appeared to veer from one to the other, hoping to avoid the fateful moment of decision. One day, he appears on the verge of forming a political alliance with his principal rival, Boris Yeltsin, president of the Russian republic. A few days later, he is raising the specter of "emergency measures" in selected parts of the country to cope with unrest.

The Soviet leader's indecision is understandable. Much more than his own career and historical reputation is at stake. The fate of a huge country, covering one-sixth of the world's surface, hangs in the balance. A wrong move could plunge the Soviet Union into ethnic strife or economic catastrophe.

When confronted with the need to make an irrevocable choice, Gorbachev's natural instinct is to preserve a line of retreat. The adoption last week by the Supreme Soviet, the nation's standing legislature, of a set of vague guidelines for the creation of a market economy was a case in point. A more radical 500-day program favored by Yeltsin represented a sharp break with decades of centralized management of the economy. After weeks of hesitation, Gorbachev evidently concluded that he could not risk such a leap into the unknown.

The 500-Day Plan was not without its flaws. Its central assumption -- that the government could soak up the excess rubles now in circulation by a massive sale of state assets -- was probably overly optimistic. Opponents of the plan argued that the removal of state controls over prices and subsidies to loss-making factories would lead to hyper-inflation and large-scale unemployment. They also criticized the rigid timetable of the plan, with its implication that a market economy could be constructed in neat, quick stages.

Equally important, in the view of many observers here, was the switch of political alliances that approval of the 500-Day Plan would have represented. In September, Prime Minister Nikolai Ryzhkov, who earlier had devised an economic reform program that would have retained many central controls, presented Gorbachev with what amounted to an ultimatum: Yeltsin or I. In the end, Gorbachev was not prepared to burn his bridges to the state bureaucracy personified by his increasingly unpopular prime minister. The reform package Gorbachev pushed through the legislature diluted some of the more radical policies favored by Yeltsin and retained some of Ryzhkov's central controls.

There is an old Communist saying, much favored by former dictator Joseph Stalin, that "cadres decide everything." The guidelines endorsed by the legislature last week are vague enough and flexible enough to be implemented in many different ways. Everything will depend on who is responsible for putting the guidelines into effect.

"The guidelines could be a catastrophe or they could work, depending on who implements them," said Anatoly Sobchak, the mayor of Leningrad and a radical legislator. "If this {Ryzhkov} government remains in charge, they will have no chance of success."

The radicals hope that Gorbachev will finally make energetic use of the extraordinary powers granted him by the legislature to break down bureaucratic opposition to radical reform. The president has the right to rule virtually by decree during the transition period to a market economy. On paper at least, he now has all the power he needs.

The problem with this scenario is that popular trust in the government is essential to the success of any reform program. Once again, the Polish experience is relevant. Successive Communist governments tried and failed to implement radical economic reforms. Only after the Polish people elected a government in which they had confidence did a free-market revolution become possible.

As an economic thinker, Yeltsin clearly has his limitations. His approach to economic reform is typically populist. When elected president of Russia last May, he argued that it was possible to make the leap from socialism to capitalism without cutting the living standards of ordinary people. His advisers have now persuaded him to amend that claim to read: "We will ensure that ordinary people get hurt as little as possible." Even so, there is a deep reluctance to recognize what might be called the Jane Fonda principle of economic reform: no pain, no gain.

The fact remains, however, that Yeltsin is the only Soviet politician with a mass following nationwide. His approval rating, according to the latest opinion polls, is around 50 percent and holding steady; Gorbachev's is down to 20 percent and falling.

The political result of last week's economic debate in the Supreme Soviet is that Yeltsin has gone back into opposition. It is a role that seems to suit him. Freed of responsibility for what will certainly be a very painful transition period, he can now criticize the government with relative impunity. In a fiery speech to the Russian legislature last Tuesday, he predicted that Gorbachev's latest plan would fail.

"Without Yeltsin's support {for economic reform}, I fear that we are on the road to nowhere," said Tatyana Zaslavskaya, a sociologist who heads the most authoritative polling institute in the Soviet Union. "Confrontation between Yeltsin and Gorbachev will mean nothing but drama for the Soviet people."

For the moment, Gorbachev still seems to be searching for some kind of agreement with Yeltsin, albeit on his own terms. At the same time, there are signs that Gorbachev is ready to use force if the situation deteriorates dramatically. The most plausible explanation for the recent spate of coup rumors, which were triggered by unexplained movements of crack troops in the Moscow region, is that Gorbachev is insuring himself against any eventuality.

So what is still holding Gorbachev back from staging his own coup in the name of order and stability? Most probably, the Polish precedent. In declaring martial law in December 1981, Jaruzelski was forced to rely on the very forces most opposed to economic reform. A coup carried out with the declared intention of saving perestroika -- the restructuring program that Gorbachev has described as his life's work -- could end up throttling it.