MOSCOW, JAN. 2 -- Soviet "black beret" security forces armed with automatic rifles occupied the main newspaper publishing plant in Latvia's capital today, setting off fears there and in the other two Baltic republics that an anti-separatist crackdown might begin sometime this month.

"This looks like the first step of a major armed action against us," said Dainis Ivans, deputy chairman of the Latvian parliament in Riga. Ivans said he was denied entry to the building by the elite Interior Ministry troops and was told: "One more step forward and we shoot."

Latvian Communist Party Alfreds Rubiks has claimed that the plant, which had been printing every major newspaper in the republic, is party property and that other groups have no right to work there. Soviet Interior Minister Boris Pugo, a former chief of the Latvian KGB secret police, denied giving the order to seize the building, but Ivans said "such a move would need the Kremlin's go-ahead, at least tacitly."

Officials of Latvia, Lithuania and Estonia, as well as Soviet Foreign Minister Eduard Shevardnadze, have expressed concern that President Mikhail Gorbachev, under pressure from the KGB, army and Communist Party, is prepared to use authoritarian measures to bring the rebellious Baltic republics to heel. Last month Gorbachev issued a series of presidential orders on the military draft and other issues that so far have been all but ignored.

Shevardnadze, in an interview published here today, said he announced his resignation as foreign minister last month as a warning to the leadership that use of authoritarian tactics to control the 15 Soviet republics could lead to widespread bloodshed.

In his first public comments since his startling announcement, Shevardnadze told the weekly Moscow News that the Soviet Union's standing in the world would suffer greatly from a crackdown reminiscent of the army's assaults on nationalists in Soviet Georgia in April 1989 and Azerbaijan last January.

"In the end, I realized that if the present destabilization of our country continues and the process of democratization stops, it would be impossible to continue with our present foreign policy," Shevardnadze said.

Shevardnadze, who is continuing as foreign minister until a replacement is named, said that despite the country's need for respect for the law, any sort of hard-line action, including the imposition of presidential rule in the republics, "cannot resolve our problems."

"My resignation was a simple, perhaps naive, step, but an honest one," he said. "It was aimed at alerting the Congress of People's Deputies to a real threat {of dictatorship}. Unfortunately, most of the deputies at the Congress were of a different mind."

Ivans said that the occupation of the Latvian publishing plant "is just the sort of dictatorial, hard-line move that Shevardnadze had warned us about."

Ivans and other Latvian sources said that between 20 and 30 black beret troops surrounded the publishing plant at about 6:30 a.m. local time. They cut off all entrances, but allowed journalists and other workers to enter the building after a thorough check of their documents. Later in the day, the journalists voted to begin a sit-down strike.

About 10,000 people demonstrated against the action in front of the Communist Party headquarters in downtown Riga this afternoon. There was no mention of the incident on Soviet television's evening news program "Vremya," and Ivans said he had information that Moscow officials had forbidden another national news program to give a report.

In what appears to be a related incident, Interior Ministry troops in Vilnius, the Lithuanian capital, have stationed armed guards at Communist Party headquarters. The party in Lithuania split into independent and pro-Moscow factions late in 1989, and there has been a dispute ever since over who has rights to the party's properties. The majority of the members broke off to form a new party that favors Lithuanian independence, while the minority favors Moscow's anti-secessionist position.

The foreign ministers of the three Baltic republics called on Moscow last weekend to open negotiations on the issue of Soviet troops stationed in the region. Baltic leaders have called the troops "an occupying force," while Moscow has charged that the Balts have harassed and humiliated the Soviet military.

Various sources have said that Shevardnadze and Gorbachev are to meet this week or next. Immediately after the foreign minister's resignation, one of Gorbachev's foreign-policy advisers, Georgi Shakhnazarov, told reporters that the Soviet president would try to keep Shevardnadze in the leadership. A Japanese newspaper also quoted Gorbachev last week as saying that he wants to find a way to keep Shevardnadze in a leadership role.

In his Moscow News interview Shevardnadze, a Georgian who was one of the architects of the Soviet "new thinking" in foreign policy, denied reports that he resigned out of emotion or because his relationship with Gorbachev had deteriorated.