Hundreds of Russian peacekeeping troops have been deployed to the disputed enclave of Nagorno-Karabakh, following a deal to end conflict in the region.
Heavy fighting between Azerbaijani and ethnic Armenian forces had been ongoing for weeks, until both sides agreed to a Russian-brokered peace deal yesterday.
The enclave is internationally recognised as Azerbaijani but has been run by ethnic Armenians since 1994.
The peace deal sparked jubilant scenes in Azerbaijan and fury in Armenia.
Under its terms, Azerbaijan will hold on to several areas that it has taken during the conflict. Armenia also agreed to withdraw from several other adjacent areas over the next few weeks.
The BBC's Orla Guerin in Baku says that, overall, the deal should be read as a victory for Azerbaijan and a defeat for Armenia.
Protesters in Armenia have damaged official buildings and called for the resignation of Prime Minister Nikol Pashinyan.
What else has been agreed?
The peace deal, which was signed by Russian President Vladimir Putin, Azerbaijani President Ilham Aliyev and Armenia's prime minister, took effect on Tuesday from 01:00 local time (21:00 GMT Monday).
During a televised online address, Putin said that Russian peacekeepers would be deployed to patrol the front line. Ten aircraft carrying the first wave of troops took off from an airbase in Ulyanovsk early on Tuesday.
At least 2000 Russian soldiers will eventually be active in the region and they will guard the "Lachin corridor" which links the Karabakh capital, Stepanakert, to Armenia. Ninety armoured personnel carriers will also deploy as part of the renewable five-year mission.
Putin said the agreement would include an exchange of war prisoners, with "all economical and transport contacts to be unblocked."
Moscow is in a military alliance with Armenia and has an army base there, but it also has close ties with Azerbaijan and it has been selling weapons to both countries.
Turkey, which has openly backed Azerbaijan, will also take part in the peacekeeping process, according to Azerbaijan's president who joined Putin during the address. However, the exact role Turkey will play is unclear.
How did the deal come about?
Although both sides took steps to reduce tensions last year, fighting erupted at the end of September and several attempts to end the conflict failed.
Over the weekend, Azerbaijan said it had taken control of the key town of Shusha, known as Shushi in Armenian.
The town is strategically important because it could serve as a well-positioned staging post for an attack on Nagorno-Karabakh's main city of Stepanakert, military analysts say.
While Armenia denied the town had been lost, on Tuesday Nagorno-Karabakh's ethnic Armenian leader Arayik Harutyunyan said his forces had little choice but to sign a peace deal given the situation on the ground.
Battles were already taking place on the outskirts of Stepanakert and if the conflict had continued the whole of Karabakh would have been lost, he said on Facebook. "We would have far more losses," he said.
Meanwhile Pashinyan, Armenia's prime minister, said signing the deal was "incredibly painful both for me and for our people".
He added: "The decision was made based on a deep analysis of the combat situation and in conjunction with the best experts."
Azerbaijan's President Aliyev, meanwhile, said the agreement was of "historic importance," and amounted to a "capitulation" by Armenia.
Turkey's Foreign Minister Mevlut Cavusoglu hailed it as a "sacred success".
But France's Emmanuel Macron expressed hope that the deal would "preserve Armenia's interests" and called on Turkey to "end its provocations" over the conflict.
France is home to a large Armenian community and Macron said the country "stands by Armenia at this difficult time".
How deadly was the conflict?
It is unclear exactly how many have died during the flare-up in fighting. Both sides deny targeting civilians but accuse the other of doing so.
Nagorno-Karabakh's authorities say nearly 1200 of its defence forces have died in the fighting, and civilians have also been killed or injured.
Azerbaijan has not released its military casualty figures but has said more than 80 civilians were killed in the fighting - including 21 in a missile strike on the town of Barda last month.
Russia's Vladimir Putin said last month that almost 5000 people had been killed in the fighting.
-BBC