MOSCOW, JULY 25 -- President Mikhail Gorbachev today gave Soviet vigilante groups 15 days to surrender their arms and disband, in a crackdown directed against Armenian militants and other nationalist movements rising across the Soviet Union.

Gorbachev also empowered the KGB secret police and other official agencies to confiscate weapons from armed groups and he threatened to call out army troops against them if they endanger people's safety or the security of the state.

The decree gives the KGB virtually a free hand to suppress dissident ethnic groups anywhere in the Soviet Union. And in authorizing broader use of troops, it endorses a move that in the past has been widely criticized by powerful Soviet nationalist groups.

The presidental decree, as published by the official Tass news agency, is one of Gorbachev's toughest. It is regarded by Moscow-based activist groups as particularly harsh and as an indication of worsening tensions between authorities in Moscow and militant nationalist forces in the country.

Today's action follows several raids in Armenia by nationalist groups against Soviet troop reinforcements that have been deployed in the southern republic for several months. At the end of May, clashes between Armenian militants and troops resulted in about 30 deaths. In one shoot-out at the railway station in Yerevan, the capital, 12 people were killed, including several soldiers.

In recent weeks, violent battles between armed groups also have occurred in Soviet Kirghizia. In fighting between ethnic Uzbeks and Kirghiz in that Central Asian republic, 200 people have been killed and more than 400 are missing, according to today's issue of the government newspaper Izvestia.

The decree was clearly designed to strengthen Moscow's war against nationalist vigilantes. Its harshness indicates that the Soviet leadership feels it has exhausted other options and is resorting to a last-ditch effort to keep ethnic violence from spreading.

It calls on "republican and local organs of power, the Soviet Interior Ministry and the State Security Committee {the KGB} to ensure the confiscation of these weapons if this demand is not met," according to Tass.

"If actions of these armed groups endanger the safety of the population and the state, the Interior Ministry has the right to use Interior troops and the units of the Soviet Defense Ministry may become involved in some operations," the decree said.

In threatening to use troops, Gorbachev raised an issue that is particularly explosive in the Soviet Union. Recent incidents where Soviet army units were called out erupted into violence and deaths and increased animosities between local ethnic groups and Soviet authorities.

In April 1989 in the Georgian capital of Tblisi, for example, soldiers killed 20 Georgians, some by beating them with shovels. The use of troops in ethnic violence in Azerbaijan this year also led to clashes.

Although signed by Gorbachev, some observers said the decree may have been initiated by the army. For weeks, military leaders in Armenia have been issuing warnings against local ethnic bands. After a recent visit there, Col. Gen. Yuri Shatalin, commander of Interior Ministry troops, accused local officials in Yerevan of abetting armed bands in their guerrilla attacks against troops. He called the situation there "extremely tense and explosive."

Today's statement echoed Shatalin's assessment, saying it came "in response to the creation of armed groups in some regions, with the connivance of local authorities, which are not part of the U.S.S.R. armed forces, border, interior and railway troops and other paramilitary units."

Armed ethnic groups also reportedly have formed in Georgia and in Latvia, Lithuania and Estonia, the three Baltic republics seeking independence.