Ethnic Armenian refugees began to leave Nagorno-Karabakh on Sunday for the first time since Azerbaijan launched an offensive designed to seize control of the breakaway territory and perhaps end a three-decade-old conflict.

Azerbaijan's one-day operation that ended Wednesday with a separatist pledge to disarm could mark a historic geopolitical shift, with Baku victorious and Armenia publicly distancing itself from its traditional ally Russia.

"Yesterday, we had to put down our rifles. So we left," a man in his thirties from the village of Mets Shen told AFP as a first group of a few dozen people crossed the border and registered with Armenian officials in Kornidzor.

"We had 15 minutes to pack everything up, regretting having left his livestock and the grave of his three-year-old daughter behind in Mets Shen. "I didn't tell her goodbye. I hope to go back."

RTL

Azerbaijani forces control the commanding heights around the separatist stronghold of Stepanakert / © AFP

According to the Armenian government, by Sunday evening 377 "forcefully displaced persons" had crossed from Azerbaijan to Armenia.

Most of the refugees seen by AFP were women and children, including some from Eghtsahogh, where people took shelter around a Russian peacekeeping base after their village allegedly came under Azerbaijani shelling.

Separatist leaders have said they are negotiating the fate of some 120,000 ethnic Armenians from Nagorno-Karabakh in talks with Azerbaijani officials mediated by Russian peacekeepers.

Azerbaijan said Sunday it had switched the region's main city, Stepanakert, to its own power grid as part of the "reintegration" effort.

But civilians who have managed to escape report shortages of food, water and fuel caused by Azerbaijan's nine-month blockade.

- Rift with Russia -

As drama unfolded on the border, Armenia's Prime Minister Nikol Pashinyan -- himself a target of protests over the crisis -- sought to deflect the blame onto long-standing ally Russia, signalling a breakdown in the countries' security pact.

In nationally televised comments, the Armenian leader said the Russian-led Collective Security Treaty Organisation (CSTO) and Moscow-Yerevan military-political cooperation were "insufficient" to protect the country, suggesting that he would seek new alliances.

RTL

Armenian Prime Minister pivoted away from historic ally Russia in a major television address / © Press Service of Armenian Prime Minister/AFP

The CSTO members pledge to defend one another from outside attack. But, bogged down in its own war in Ukraine, Russia refused to come to Armenia's assistance in the latest Nagorno-Karabakh conflict, arguing that Yerevan itself had recognised the disputed region as part of Azerbaijan.

Now, Russian peacekeepers are helping Azerbaijan disarm the Karabakh rebels.

Pashinyan said Armenia should ratify the treaty which established the International Criminal Court (ICC), which has issued an arrest warrant for Russian President Vladimir Putin over the Ukraine war.

The rift comes with Pashinyan under pressure at home from thousands of Nagorno-Karabakh supporters who have been rallying and blocking roads in Yerevan since Wednesday's ceasefire deal.

They planned to stage more disruptions over three days starting Monday, some voicing anger at Pashinyan's pivot away from Moscow.

- Anger and grief -

Aliyev, meanwhile, intended to cement his victory by flying to the Azerbaijani western exclave of Nakhichevan for talks with Turkish President Recep Tayyip Erdogan, his most important regional ally.

RTL

Azerbaijan launched a punishing 24-hour assault that forced the rebels to agree to disarm / © AFP

Turkey supplied Baku with a fleet of combat drones that helped Azerbaijan claw back a chunk of the disputed territory in a six-week war three years ago.

The two leaders planned to hold a groundbreaking ceremony for a new natural gas pipeline and open a modernised Azerbaijani military complex, a show of Turkish force that contrasted sharply with Russia's apparent withdrawal from the region.

RTL

Nagorno-Karabakh refugees fleeing to Armenia mostly compromise women, children and the elderly / © AFP

The diplomatic manoeuvres come with tensions running high on the ground.

At the Kornidzor crossing, five kilometres (three miles) from the Hakari bridge on the convoy's route, where angry relatives had gathered to await news, one man was so frustrated he pulled out a knife in front of police.

"My son was in the army in Artsakh. He's alive, but I'm worried for him," said Alik Blbuyan, 43, using the name Karabakh's ethnic Armenian population gave their breakaway statelet.

"I came here to get news but I'm also hoping armed groups will cross the border. If they do, I'll go with them to rescue my son," he said.

- 'Our beautiful land' -

On the other side of the border in Azerbaijani settlements such as Terter and Beylagan, locals had no sympathy for their Armenian neighbours and were celebrating their government's victory over the rebels.

State television played music paying tribute to the nation and its army, and the roadsides were lined with flags and portraits of dozens of local "martyrs", fallen in the fighting during the previous 30 years.

Famil Zalov, whose 18-year-old brother was among those killed, was in no mood to forgive.

"I support the operation," the farmer, now in his early fifties, told AFP. "Our beautiful land got liberated. I'm proud my brother was avenged."

Asked whether he could imagine living alongside ethnic Armenians in peace now, he said he could not: "The president has shown them the way. The corridor is open. They can use it and go away."