Azeri and ethnic Armenian forces have fought in new clashes as Russia prepares to host talks with the warring sides' foreign ministers.
Russia's foreign ministry was quoted by RIA news agency as saying Armenia and Azerbaijan had accepted the offer of talks, after the Kremlin invited their foreign ministers to the Russian capital on Friday.
"Baku and Yerevan confirmed their participation in talks in Moscow. Active preparation is under way," foreign ministry spokeswoman Maria Zakharova said.
If the two foreign ministers meet, it will be the first direct contact known to have taken place between the two former Soviet republics since fighting broke out in their decades-old conflict on September 27.
More than 400 people have been killed in the fighting in and around Nagorno-Karabakh, a mountain enclave which under international law belongs to Azerbaijan but is populated and governed by ethnic Armenians.
It has become the deadliest conflict in the South Caucasus for more than 25 years.
Azerbaijan's defence ministry said there had been fierce clashes with ethnic Armenian forces during the night along the line of contact that divides the two sides in Nagorno-Karabakh.
More details of the latest clashes were not immediately available.
Fighting has continued despite the start of a concerted peace drive by the United States, France and Russia.
Azeri Foreign Minister Jeyhun Bayramov agreed to attend talks with the three powers on Thursday in Geneva but no details of the meeting have been released.
Armenian Foreign Minister Zohrab Mnatsakanyan did not attend the Geneva talks but was expected to meet Russian, French and US officials in Moscow on Monday.
The latest fighting in the decades-old conflict over Nagorno-Karabakh has raised fears that Turkey, a close ally of Azerbaijan, and Russia, which has a defence pact with Armenia, will be dragged into the conflict.