Soviet tanks patrolled Friday in three curfew-bound cities in the southern republic of Azerbaijan, where hundreds of thousands of people demonstrated in a fourth straight day of ethnic unrest, authorities said.

The protests stem from a 10-month-old dispute over nationalist demands in the mainly Christian Armenian enclave of Nagorno Karabakh that their autonomous territory of 177,000 people be allowed to secede from predominantly Moslem Azerbaijan.Hundreds of thousands of people carrying Islamic flags and anti-Armenian banners marched through the Azerbaijani capital of Baku, the city of Kirovabad near the Armenian border, and the city of Nakhicheven, the officials said.

The official Tass news agency, which has largely ignored the latest round of protests that began Tuesday, reported the deaths of three Soviet soldiers Wednesday in a brief dispatch filed 24 hours after the incident.

In neighboring Armenia, authorities reported demonstrations in the capital of Yerevan in support of Armenians in Azerbaijan. An Armenian official said two people died in clashes in Armenia but had no further details.

Soviet authorities said they were enforing dusk-to-dawn curfews in the three Azerbaijan cities and in the Armenian capital.

Musa Manedov, a spokesman of the Azerbaijan Foreign Ministry contacted in Baku by telephone said Friday's demonstrations had quieted by nightfall as the curfew approached.

"In Baku demonstrations continued today with people protesting against the wish of Nagorno Karabakh to leave the republic," Manedov said.

"People have been waving Azerbaijani republican flags and there have also been some green Islamic flags again today. A number of them carried posters such as, `Armenians Out' and we have troops and tanks deployed in all three cities where they are protesting," Manedov said.

He declined to confirm or deny reports by dissidents in Moscow with Armenian contacts in Baku that demonstrators had also been waving posters of Iranian spiritual leader Ayatollah Ruhollah Khomeini.

"All other 11 Azerbaijani cities appear to be quiet, and today things were less heated than yesterday. By nightfall they started to disperse," Manedov said.

Rudolf Khachanov, an Armenian republican representative in Moscow voiced concern over the rising ethnic tensions.

"It is serious enough when you have one Islamic flag flying. There are religious grounds to this conflict. Everybody knows about the killing of Armenians by Moslems. The Armenians are right there on the frontline of Moslem hatred for Christians," he said.

"We have had telephone calls all the time from Armenians in Azerbaijan who are really frightened. For instance we have heard unofficially that a green Islamic flag was flown atop the Communist Party headquarters in Nakhichevan, but we have no firm details of this," Khachanov said.

Under the political reforms of President Mikhail Gorbachev, strong nationalist movements emerged in Azerbaijan, Armenia, Soviet Georgia and the three Baltic republics of Latvia, Estonia and Lithuania.

In addition to the Nagorno Karabakh unrest, people in the Baltic states and Georgia are protesting proposed changes in the constitution.