Soldiers from Azerbaijan and Nagorno-Karabakh were killed early on Tuesday, hours after the Armenian and Azeri presidents agreed on the need for a peaceful settlement to the conflict in the breakaway region where violence flared again last month.
Monday's meeting between Armenian President Serzh Sarksyan and Azeri President Ilham Aliyev in Vienna was the first since fighting between Armenian-backed separatists in Nagorno-Karabakh and Azeri forces restarted. The resurgence in violence has killed dozens of people and pushed relations between the neighbours to their worst in years.
"The presidents reiterated their commitment to the ceasefire and the peaceful settlement of the conflict," the United States, France and Russia said in a joint statement after the meeting.
"To reduce the risk of further violence, they agreed to finalise in the shortest possible time an OSCE investigative mechanism."
The two leaders also agreed to fix a time and place for their next meeting in June and that the Organisation for Security and Cooperation in Europe (OSCE) would quickly finalise a plan to monitor the ceasefire in Nagorno-Karabakh, it said.
A ceasefire agreed a month ago has stopped the short conflict becoming an all-out war, but residents say gunfire and shelling still echo nightly, and people are still being killed.
In a sign of continued high tensions, a soldier from Nagorno-Karabakh was killed just after midnight on Tuesday as a result of shooting from Azerbaijan's side, Nagorno-Karabakh's defence ministry said.
An Azeri soldier was also killed "in a ceasefire violation", Azerbaijan's defence ministry said.
"DESIRE FOR COMPROMISE"
The ex-Soviet state of Azerbaijan and separatists backed by Armenia fought a war over the territory of Nagorno-Karabakh in the early 1990s, with thousands killed on both sides and hundreds of thousands displaced.
The war ended with a truce in 1994, although there has been sporadic violence since. The ceasefire was shattered last month when Azerbaijan's army and Armenian-backed separatists exchanged heavy fire using artillery, tanks, rockets and helicopters.
After Monday's meeting, Russian Foreign Minister Sergei Lavrov said he sensed there was now a desire on both sides for a compromise and that Russia was ready to do what it could to broker a more satisfactory deal, according to RIA news agency.
U.S. Secretary of State John Kerry, who is in Vienna for meetings on Syria and Libya, held one-on-one talks with the Armenian and Azeri leaders.
Sarksyan's office confirmed the details in the joint statement, saying a deal was struck to step up monitoring of the existing ceasefire, to look at beefing up the OSCE team and to take steps towards resuming talks on a more permanent solution.
The conflict has worried the international community in part because it could cause instability in a region that serves as a corridor for pipelines taking oil and gas to world markets.