Riot police arrested dozens of people who broke into Azerbaijan's parliament early on Wednesday morning.
After a protest to show solidarity with the army, which has skirmished with neighboring Armenia's military on the border over the past few days. More than a dozen have been killed or wounded.
Thousands marched through the Azeri capital Baku and there were demonstrations in other cities despite a lockdown ban on large gatherings.
Emotions ran high and demonstrators entered the parliament building, but they appeared not to intend that as a protest against the government itself.
Eleven Azeri soldiers and a civilian, and four Armenian servicemen, have been killed since Sunday in border fighting around the Tavush region in northeast Armenia.
Armenia and Azerbaijan fought a war in the 1990s over the mountainous Nagorno-Karabakh region.
Which is inside Azerbaijan but run by ethnic Armenians, who declared independence as the Soviet Union collapsed in 1991.
The South Caucasus region is a crucial corridor for oil and gas pipelines.
So clashes between Armenia and Azerbaijan are a strategic concern for global powers.