The breakaway region of Nagorno-Karabakh said two of its soldiers were killed by gunfire from Azerbaijan early on Tuesday, as tensions simmered weeks after an eruption of clashes.
Both sides said they exchanged fire overnight, blaming each other for starting the fighting.
A Moscow-brokered ceasefire halted four days of violence in the South Caucasus region on April 5, but sporadic shooting is still frequent at night.
The defense ministry in the Armenian-backed rebel region accused the Azeri armed forces of violating the ceasefire more than 80 times "with the use of almost all types of artillery and armor in (Azerbaijan's) arsenal".
It said it had had to return fire, "causing significant losses in the enemy's manpower and military equipment".
Azerbaijan's defense ministry, which made no mention of any losses on its side, said it had carried out a "retaliatory strike" after the Armenian army hit its positions from multiple rocket launchers.
It said the entire responsibility for the events on the contact line separating the sides of the conflict "rests with the military-political and criminal leadership of Armenia".
Read also: Nagorno-Karabakh conflict solution has to respect sovereignty and territorial integrity of Azerbaijan – Ukraine opinion
Nagorno-Karabakh is a mountainous enclave within Azerbaijan's borders, populated mainly by ethnic Armenians who reject Azerbaijan's rule. With support from Armenia they fought a war in the early 1990s to establish de facto control over the territory.
The fighting this month was the most intense since a 1994 ceasefire that stopped the conflict but did not resolve the underlying dispute.