International mediators, who have for years sought to help the two countries reach a breakthrough, expressed concern over the violence.
Azerbaijan's defence ministry said Armenian troops had ramped up their activity in the past few days and attacked Azeri positions.
"Reconnaissance and sabotage groups of the Armenian armed forces attempted to break through the line of contact between the troops along the entire front line," the ministry said, adding that the Armenian troops had been repelled.
Azerbaijan and Armenia have been locked in a protracted conflict over the Nagorny Karabakh region with occasional skirmishes along the front.
More From This Section
The latest clashes however represent a surge in tensions between the two countries, with one prominent Azeri military expert saying Baku has not suffered such losses in a single bout of hostilities since 1994.
Azerbaijan said Armenia had also suffered losses, although it did not provide any details.
In Armenia, a high-ranking defence ministry official presented a different version of the events.
"Azerbaijani subversive groups were ambushed. As a result, they have 14 dead and lots of wounded. There are no casualties or wounded on the Armenian side," the official said.
Officials in Nagorny Karabakh for their part had said that two Armenian troops died in an attack by Azerbaijani forces yesterday.
Armenian-backed separatists seized Nagorny Karabakh from Azerbaijan in a 1990s war that killed 30,000 people.
Despite years of negotiations since a 1994 ceasefire, the two sides have yet to sign a peace deal.