International powers immediately reacted to the unrest, with Russia accusing Baku of breaching the brittle ceasefire and the EU urging an "immediate cessation of hostilities".
Arch-enemies Armenia and Azerbaijan have fought two wars, one in 2020 and another in the 1990s, over Azerbaijan's Armenian-populated region of Nagorno-Karabakh.
Armenia ceded large areas of territory it had controlled for decades, and Russia sent about 2,000 peacekeepers to oversee the fragile truce, but tensions persist despite a ceasefire agreement.
On Wednesday, new tension erupted as Azerbaijan said one of its soldiers was killed and the Karabakh army said two of its troops were dead and more than a dozen injured.
Azerbaijan's Defence Ministry said Karabakh troops hit its army positions in the district of Lachin, which is under the supervision of the Russian peacekeeping force, killing an Azerbaijani conscript.
Azerbaijan's army later said it conducted an operation called "Revenge" in response and took control of several strategic heights in Karabakh.
The army of the breakaway region accused Azerbaijan of breaching a ceasefire agreement, killing two soldiers and wounding 14.
Karabakh declared a "partial mobilisation", the army said.
Armenia called on the international community to help stop Azerbaijan's "aggressive actions" after the flare-up.
"Azerbaijan continues its policy of terror against the population of Nagorno-Karabakh," the foreign ministry said.
Ray of hope peeks through Turkey's sealed Armenia border - in pictures
Armenia accused Azerbaijan of seeking to make unilateral changes over the Lachin corridor that links Armenia and Karabakh.
"The ceasefire regime was violated by the armed forces of Azerbaijan around the Saribaba Height," the Russian Defence Ministry said.
"The command of the Russian peacekeeping force, with representatives of Azerbaijan and Armenia, are taking measures to stabilise the situation."
The EU called for an immediate halt to fighting.
"It is essential to de-escalate, fully respect the ceasefire and return to the negotiating table to seek negotiated solutions," EU foreign policy chief Josep Borrell's spokesman said.
"The European Union remains committed to help overcome tensions and continue its engagement towards sustainable peace and stability in the South Caucasus."
After Moscow's intervention in Ukraine on February 24, an increasingly isolated Russia lost its status as the primary mediator in the Karabakh conflict.
Six weeks of fighting in the autumn of 2020 claimed more than 6,500 lives and ended with a Russian-brokered ceasefire agreement.
In July, Azerbaijan began the process of returning its people to land recaptured from Armenian separatists in what Baku calls "the Great Return".
The oil-rich country has vowed to repopulate lands recaptured in the six-week war with Armenia.
President Ilham Aliyev had for years promised to retake lands lost in the 1990s and the first returns marked a symbolic moment for Azerbaijan.