With the United States on the brink of war in the Persian Gulf, Mikhail Gorbachev is threatening direct presidential rule over republics that fail to sign his all-union treaty by Dec. 30, starting with Latvia even before the deadline.

This power grab would start with the Soviet Union seeking to take over port and rail facilities in the Latvian capital of Riga in order to speed shipment of food to hungry Russians. If the Latvians resist, President Gorbachev could use the emergency to seize political control by imposing Moscow's rule.

Simultaneously, Gorbachev has empowered vigilante law throughout his disintegrating nation and installed a KGB veteran to run his internal police. These moves shock Gorbachev-watchers who believed the bad old days of Soviet oppression against its own citizens had ended.

But with President Bush in dire need of Gorbachev's backing in the Gulf, the United States is unlikely to interfere. Bush and Secretary of State James A. Baker III show no sign of dismay. Their ardent courtship of Gorbachev all through the Gulf crisis suggests they support his efforts to stop further erosion of his control over a unified Soviet state.

Thus, in the way preoccupation with the Suez crisis enabled Soviet troops to crush the 1956 Hungarian revolt, the Gulf standoff may help Gorbachev achieve his goals. What he apparently has in mind is just coming into focus: use the food emergency that threatens Soviet citizens everywhere as a pretext for a new law-and-order regime that can smash the dream of independence from the Baltics to the Russian Republic.

Soviet specialists here believe Gorbachev has chosen the specter of famine to justify repression. Given the massive cheating and black marketeering blocking food from the state-run outlets, Gorbachev can claim that vigilante law -- reminiscent of ruthless Bolshevik "citizens' groups" established in 1919 under Joseph Stalin -- is the only way to end cheating and prevent mass starvation. No one can be against stopping starvation.

Gorbachev's effort to regenerate harsh police power has had no official response from Washington. Instead, the administration finds this the appropriate time to start public debate about sending emergency food to Moscow. Bush suddenly says he has more leeway than he thought to waive the Jackson-Vanik law, which blocks normalized Soviet trade.

The appointment of Boris Pugo as interior minister has a special connotation for the Baltic states, the crucible of opposition among Soviet republics to Gorbachev's new all-union treaty. A native-born Latvian who chose to side with Moscow over independence, Pugo headed the Latvian KGB and then became first secretary of the Latvia Communist Party in 1984. He is feared and hated throughout the three Baltic states and knows exactly how to tighten the screws in his native land.

For Pugo's deputy, Gorbachev turned to the only active duty officer popular among soldiers and veterans: Gen. Boris Gromov, commanding officer of Soviet forces in Afghanistan when Gorbachev pulled his troops out. If Gorbachev ever attempted to impose a new dictatorship in partnership with the Soviet military, Gromov would be his best bet, in the view of some U.S. specialists.

But for now, Gorbachev's choice of Gromov seems dictated by the 47-year-old general's high standing with Afghanistan war veterans, many of whom are now homeless, jobless, angry and deeply disillusioned. This manpower pool would be just right to fill the role of vigilante. Called "Afghanitza," hundreds of thousands of these veterans worship their former commander.

Gorbachev wants his all-union treaty ratified by Dec. 30, the anniversary of the original treaty creating the Soviet Union in 1922. He sees ratification of the treaty as absolutely vital if he is to control Boris Yeltsin, leader of the Russian Republic, and lesser anti-Moscow republican leaders in the Baltics, Moldavia, Georgia and others.

Ominously, Gorbachev may switch to plebiscites or referendums to meet the deadline. With the parliaments of these republics in concrete against the treaty, Gorbachev might have a better chance to mobilize the populace behind the treaty, using the threat of famine to entice them rather than the political elites that control the republics' parliaments. If all else fails, administration sources say privately Gorbachev is certain to impose direct presidential rule to obtain his treaty.