MOSCOW, DEC. 21 -- One of Mikhail Gorbachev's closest advisers said today that the Soviet president would not "part lightly" with Foreign Minister Eduard Shevardnadze and would try to keep him in the government.

Georgi Shakhnazarov, a key foreign policy adviser, said he was "sure Shevardnadze would stay on Gorbachev's team. The president is not the sort of person who would part with such an ally." Shevardnadze resigned Thursday after warning darkly of a return to dictatorship. His spokesman called the decision final.

Shevardnadze, who said he would stay on as foreign minister until a replacement is appointed, met for two hours this morning with Gorbachev. The Soviet leader's spokesman, Vitaly Ignatenko, said the two men discussed arms control issues and the Persian Gulf crisis, but gave few other details.

"In short, it was an ordinary conversation between a president and his foreign minister," Ignatenko said. Asked whether Shevardnadze had withdrawn his resignation or was asked to stay on, Ignatenko said, "People don't resign just by closing the door. There are appropriate procedures for this."

Pavel Bunich, a leader of the Supreme Soviet's foreign policy committee, said in an interview that the most likely replacement for Shevardnadze would be either Yuli Vorontsov, the Soviet representative at the United Nations, or Alexander Bessmertnykh, now ambassador to the United States. Other legislators have mentioned Yevgeny Primakov, Moscow's special envoy to the Persian Gulf, but Bunich said "that is less likely."

Bunich, as well as a number of other sources in the foreign and defense ministries, said Shevardnadze's resignation would have no affect on the direction of Soviet foreign policy. Bunich said that at Saturday's or Monday's session of the Congress of People's Deputies, a group of legislators would likely introduce a resolution to "assure the world that we have no intention of changing course." A similar resolution was adopted Thursday.

Many legislators, even some of his supporters, criticized Shevardnadze for resigning when Moscow was in the midst not only of a domestic but also a diplomatic crisis.

"The crisis in the Persian Gulf is perhaps the most serious crisis we have had since the Cuban missile crisis," said historian Roy Medvedev, a deputy and member of the Communist Party Central Committee. "Who will direct our policy there? Who is up to speed? It's hard to say. In such conditions, the resignation is a big blow to Gorbachev."

Gen. Mikhail Moiseyev, the army's chief of staff, denounced Shevardnadze's resignation and denied that any sort of dictatorial rule is being prepared.

More than 500 legislators from Lithuania, Moldavia, Armenia, Estonia and other republics have either boycotted the Congress or decided, after a few days, to leave for home. Since Gorbachev needs a vote of two-thirds of the Congress's membership to change the constitution and increase his executive powers, he faces the serious prospect of failing to gain the authority he was looking for.

Much of the discussion today centered on constitutional changes, but time and again the speeches turned back to Shevardnadze's resignation and the issue of dictatorship.

A leader of the Inter-Regional Group of radical deputies, Vitaly Chelyshev, said that Shevardnadze is only the "latest of the visible figures of reform" to be "forced out" of power. He cited Vadim Bakatin, who was fired last month as interior minister, and Alexander Yakovlev, Gorbachev's closest adviser until recently, who is now working mainly on academic projects.

An obscure economist from Kiev, Vladimir Chernyak, stunned the Congress with a call for the dissolution of the legislature as a "wasteful political show" and for new, popular, multi-party elections for both the presidency and the Congress.

"There is a creeping reactionary coup taking place in the country," Chernyak said. "Reactionaries, centrists and imperialists have united, and at the head of this coup stands Gorbachev himself. Perhaps it is possible that he doesn't even know it, but he is creating the legal basis for a dictatorship when he demands new powers."

For the first two minutes of Chernyak's speech, many deputies laughed and hooted. But as he continued, they fell silent and listened.

"Shevardnadze resigned because he is in the minority. We cannot merely dismiss his warning about dictatorship," Chernyak said. "The last empire in history is falling apart, and I for one do not want a situation in which the last word Gorbachev listens to is that of {Defense Minister Dmitri} Yazov."

The legislature's radicals echoed Shevardnadze's warnings but seemed unable to devise a strategy to head off the right wing.

A group of 22 deputies led by the editor of Literaturnaya Gazeta, Fyodor Burlatsky, and economists Nikolai Shmelyov and Oleg Bogomolov, formed a committee called Popular Consent, intended to combat the threat of dictatorship. The Inter-Regional Group urged the deputies from the boycotting republics to return to Moscow to help battle the conservative forces.

But their efforts seemed erratic and badly organized. Yuri Vlasov, a former Olympic weightlifting champion who stunned the Congress at its first session in May 1989 with an unprecedented attack on the KGB secret police, said that the leadership's turn toward authoritarian policies is a "direct response to the panic among the people. Unfortunately . . . they are all ready to exploit that tension and use it for their own preservation."