Strikes and demonstrations Saturday swept the Armenian and Azerbaijani republics where local militias stood idly by as rioting left three soldiers dead earlier in the week, officials and the military newspaper Red Star said.

There were no new reports of the violence in Azerbaijan and Armenia, where a nightlong curfew was imposed in urban areas Wednesday and Soviet troops, tanks and armored personnel carriers patrolled streets where ethnic unrest broke out Tuesday.Officials in the Armenian capital of Yerevan and in the Azerbaijani capital of Baku reported that demonstrations and strikes continued for a fifth day Saturday, but that violence had subsided under the curfew and patrols by Soviet soldiers.

The demonstrations and strikes stemmed from a 10-month dispute over who should control Nagorno Karabakh, an autonomous, mostly Christian Armenian enclave of 177,000 people situated in Moslem-dominated Azerbaijan.

Residents of Nagorno Karabakh and their supporters are demanding that the enclave be made part of Armenia while the Azerbaijanis demand adherence to a June decision by the Soviet parliament barring transfer of control to Armenia.

Police, known as local militias, apparently did nothing to halt violence that left three Soviet soldiers dead Wednesday, more than 125 injured and ended in the arrest of at least 150 people on charges ranging from hooliganism to possession of illegal weapons, the Red Star military newspaper said.

Another two people, an Armenian and an Azerbaijani, died in ethnic clashes Thursday, officials reported.

"In conditions when the local militia idles, soldiers had to shoulder enormous responsibility," Red Star said. "In extreme conditions, they acted courageously, defending law and order."

In the first report to give details of the deaths of the three Soviet soldiers in the Azerbaijani city of Kirovabad, Red Star said, "On Nov. 22, hooligans surrounded the city (Communist) Party Committee headquarters and went on a rampage. When soldiers arrived and ringed the building, insults and threats were heard, then stones were thrown."

It said, "Someone from the crowd threw a battlefield grenade. Two soldiers and a lieutenant were killed and several people injured as a result. Groups of young people attempted to set fire to houses and cars in various parts of the city."

Red Star said, "More than 150 people were detained for the violation of law and order and several units of arms have been confiscated."

Despite official bans on public rallies and demonstrations, hundreds of thousands of people have continued to demonstrate, the newspaper said. It said the violence in Kirovabad began with rumors that a small girl had been run over by a Soviet armored personnel carrier, a rumor that the newspaper said had no foundation.

In Newton, Mass., Soviet dissident Andrei Sakharov said Friday night he has received reports that "more than 130 Armenians have been killed in the city of Kirovabad by Azeri rioters inflamed by nationalist passions, and more than 200 Armenians have been wounded."

"Armenian people are again facing the threat of genocide. This must not be allowed," Sakharov, making his first visit to the United States, said in a statement.

The ethnic unrest in the Transcaucasian republics come at a crucial time for Soviet leader Mikhail Gorbachev, whose proposed constitutional reforms will be discussed at a meeting of the Soviet national legislature Tuesday.