Armenia and Azerbaijan's foreign ministers said that after almost three weeks of struggle over a disputed region, they were going to declare a humanitarian truce at midnight (2000 GMT, Saturday).
It will be a second attempt by the warring sides, to declare a ceasefire in Nagorno-Karabakh that has killed hundreds of people for nearly three weeks.
Armenia's Ministry of Foreign Affairs said late on Saturday, "The Republic of Armenia and the Republic of Azerbaijan have agreed to a humanitarian truce by 18 October 0:00 local time [2000 GMT].
The move was confirmed in the same statement by the Azerbaijan Ministry of Foreign Affairs.
The announcements were made following Russian Foreign Secretary Sergey Lavrov's telephone converse in Moscow last Saturday, according to the foreign minister, with his counterparts from Armenia and Azerbaijan and highlighting the "need to strictly follow" ceasefire.
The Moscow Department stated that the importance of starting "substantial" negotiations to resolve the conflict was also confirmed by both sides.
After 11 hours of negotiations mediated by Moscow's Lavrov, Armenia and Azerbaijan had agreed to a cease-fire last Saturday, but both of them were then also charged with violating the agreement.
Since 27 September Nagorno-Karabakh has been a scene for deadly clashes between the breakaway region of Azerbaijan that is mainly populated by Armenian ethnic groups and backed up by Erevan.
More than 700 people were killed in the clashes, according to an official but partial one.
Since a 1994 ceasefire put an end to a brutal war that killed 30,000, Mountainous western Azerbaijan has remained under Armenian separatist control.
Declaration of Azerbaijan
A statement condemning Armenia's attacks was issued earlier on Saturday by the Ministry of Foreign Affairs of the Republic of Azerbaijan.
It said, "The Armenian military attacked Azerbaijan's Ganja town with ballistic missiles on the night of October 17. This, in the third row, an atrocious attack against Azerbaijan's second-biggest city, caused serious civil casualties as Armenia's new aggression on Azerbaijan, far from the frontline; 12 civilians, including two children killed, injured over 40 people.
"The deliberate and indiscriminate targeting of civil people by Armenia is a war crime, and a crime against humanity and the leadership of Armenia has full responsibility for this crime, in the blatant violation of international standards, including international humanitarian law and the declared humanitarian cesses-fire and for the intentional killing of peaceful people.
"Those inhumane acts of Armenia against the people of Azerbaijan should not be stopped by the continuous aggression of Armenia, the cruel attacks on civilians and the international community.
"We strongly condemn and urge the aggressor to stop his war crimes and vicious attacks by Armenia against the Azerbaijani civilians.
Armenia's political-military leadership is responsible for placing an order on the missile selling peaceful populations using terror as state policies. The Republic of Azerbaijan states that the perpetrators of this crime shall be brought to justice under national and international law mechanisms, "added the statement.