Both sides had accused each other earlier of fresh attacks in violation of a week-old Russian-brokered truce that had failed to halt the worst fighting in the South Caucasus since the 1990s.
Azerbaijan had said 13 civilians had been killed and more than 50 wounded in the city of Ganja by missiles from Nagorno-Karabakh. Armenia, which supports Nagorno-Karabakh politically and economically and sends volunteers to serve in its army, accused Azerbaijan of shelling populated areas of the enclave and bombing targets in Armenia.
The fighting is the worst in the region since Azerbaijan and ethnic Armenian forces went to war in the 1990s over Nagorno-Karabakh, internationally recognized as part of Azerbaijan but populated and governed by ethnic Armenians.
Both countries announced the ceasefire in identical statements.
Russian Foreign Minister Sergei Lavrov had talked to his Armenian and Azeri counterparts by phone on Saturday and stressed that the truce that he mediated a week ago must be observed, Moscow said.
Russia, France and the United States belong to the Minsk Group, which has attempted to help resolve the conflict under the umbrella of the Organisation for Security and Cooperation in Europe (OSCE).
Nagorno-Karabakh's foreign ministry issued a statement saying it "reaffirms its readiness to maintain the terms of the humanitarian ceasefire on a reciprocal basis ... according to the Moscow statement of Oct. 10 and the agreements of Oct. 17."
Armenia speaks to Azerbaijan on Nagorno-Karabakh's behalf as Baku refuses to negotiate with the separatist authorities.
Yerevan says its own forces are not involved in the conflict and have not attacked Azerbaijan. Many Armenian citizens, including the prime minister's son, serve as volunteers in Nagorno-Karabakh's army.
TURKEY AND RUSSIA
The latest fighting has taken on a new element with outspoken support for Baku from its ethnic cousin Turkey, which has boosted arms exports to Azerbaijan sixfold this year. Russia is close to both sides but has a defense pact with Armenia.
Armenia on Saturday denied an Azeri assertion that it had been illegally arming Nagorno-Karabakh, and accused Azerbaijan of acting to expand Turkey's influence in the region and of using Turkish soldiers - charges both Ankara and Baku deny.
Baku said on Saturday that around 20 apartment buildings in Ganja, the second-largest Azeri city, about 25 miles (40 km) from Nagorno-Karabakh, had been hit by missiles from the enclave.
A Reuters photographer saw rescuers working at the scene on Saturday morning, and an excavator clearing the debris of houses that had almost been leveled.
"We have been living in fear for days ... We are suffering a lot," one resident of the city, 58-year-old Emina Aliyeva, told reporters. "We would rather die. I wish we were dead but our children would survive."
Armenia denied that Azeri cities had been attacked, but said Azeri drones had bombed military installations and damaged civilian infrastructure in Armenia itself.
Nagorno-Karabakh officials said at least six civilians in Stepanakert, the region's biggest city, had been wounded by Azeri shelling.
A Reuters cameraman heard several explosions in the city on Friday night and in the early hours of Saturday.
"We woke up at 4 o'clock in the morning due to an awful blow ... We are scared, but we got used to it," said Lika Zakaryan, a 26-year-old resident.
Baku said on Saturday that 60 Azeri civilians had been killed and 270 wounded since the fighting flared on Sept. 27. It has not disclosed its military casualties.Nagorno-Karabakh says 633 of its military personnel have been killed, and 36 civilians.