Arch-foes Armenia and Azerbaijan traded accusations of launching a military offensive using artillery fire along their shared border on Sunday, with Baku reporting two troops killed.
Azerbaijan's defence ministry said Armenia's "offensive" from its northern Tavush region was met with a "counterstrike" and retreated.
"Two Azerbaijani servicemen were killed and five more wounded," it added.
Yerevan, on its part, accused Baku of "using artillery in an attack aimed at capturing (Armenian) positions."
"They were repulsed, suffering losses in manpower. There were no casualties among Armenian servicemen," Armenia's defence ministry spokeswoman, Shushan Stepanyan, said in a Facebook post.
The two former Soviet republics have for decades been locked in a simmering conflict over Nagorny Karabakh, a breakaway territory which was at the heart of a bloody war in the 1990s.
But the Sunday clashes were far from Karabakh, and directly between the two Caucasus states, which happens rarely.
Since a fragile 1994 ceasefire, peace talks between Baku and Yerevan have been mediated by the "Minsk Group" of diplomats from France, Russia, and the United States.
Spectre of war
Sunday's clashes erupted days after Azerbaijani President Ilham Aliyev raised the spectre of a fresh war with Armenia and denounced stalled peace talks.
On Tuesday, Aliyev threatened to withdraw from Karabakh negotiations "if they yield no results." He did not provide further details.
Citing the right to self-defence enshrined in the United Nations Charter, he rejected the negotiators' premise that "there is no military solution to the conflict."
An all-out war between the two countries could potentially envelop the entire Caucasus, dragging in regional powers -- Armenia's military ally Russia and Azerbaijan's patron Turkey -- which compete for geopolitical influence in the strategic region.
Commenting on the clashes on Sunday, Aliyev said "Armenia's military adventure is aimed at dragging into the conflict the military-political organisation of which it is a member."
He was referring to the Moscow-led Collective Security Treaty Organization (CSTO).
Aliyev accused Yerevan of military buildup along the two countries' border and of "regularly" shelling civilian targets in Azerbaijan.
Ethnic-Armenian separatists seized Karabakh from Azerbaijan in a war that claimed 30,000 lives in the early 1990s, but the international community still views the region as part of Azerbaijan.
Energy-rich Azerbaijan, whose military spending exceeds Armenia's entire state budget, has repeatedly threatened to take back the breakaway territory by force.
Moscow-allied Armenia has vowed to crush any military offensive.
In 2016, deadly clashes in Karabakh nearly spiralled into full-scale war.