The step, confirmed by the Kremlin and Azerbaijan on Wednesday, comes as Russia faces pressure in the wider region with neighbouring Armenia demanding Russian border guards leave its main airport and protesters in Georgia confronting what they say is a Russia-leaning government.

Nearly 2,000 Russian peacekeeping troops deployed to the breakaway region of Nagorno-Karabakh in November 2020 under a Moscow-brokered deal that halted six weeks of fighting between Azerbaijani and ethnic Armenian forces.

Despite the deployment, Azerbaijan retook Karabakh by force in September last year in a move which triggered an exodus of 120,000 ethnic Armenians living there and the arrest of the breakaway area's ethnic Armenian leaders.

Armenia's political leadership accused Moscow at the time of failing to protect Armenian interests, a charge Russia rejected.

Unverified video of Russian armoured personnel carriers purportedly driving towards Dagestan in southern Russia was posted on social media in Azerbaijan on Wednesday.

When asked about Azerbaijani media reports of a Russian withdrawal from Karabakh and areas nearby, Kremlin spokesman Dmitry Peskov said:

"Yes, it really is the case." He did not elaborate.

Azerbaijani news agency APA reported late on Tuesday that Russian peacekeepers had begun withdrawing and that the first personnel and equipment had disappeared from a monastery revered by Armenians in Azerbaijan's Kalbajar district a few days ago.

APA said Azerbaijani police officers had replaced the Russians at the site.

Hikmet Hajiyev, foreign policy adviser to Azerbaijani President Ilham Aliyev, was cited by state news agency Azertac as confirming a withdrawal deal had been struck.

"The early withdrawal of Russian peacekeepers, temporarily stationed in the territory of the Republic of Azerbaijan, in accordance with the trilateral Statement signed on November 10, 2020, has been decided by the leaders of both countries," it cited him as saying.

"The process has already begun, with the ministries of defence of Azerbaijan and Russia implementing appropriate measures for the execution of that decision."

The peacekeepers, whom Armenian Prime Minister Nikol Pashinyan had criticised for not intervening to stop Azerbaijani forces in Karabakh, had originally been due to stay until 2025.

Pashinyan has since publicly questioned his country's traditional alliance with Russia - which has a string of military facilities inside Armenia - and has started to forge closer ties with the West.

Armenia has also asked Russian border guards to leave their posts at the country's main airport in Yerevan from Aug. 1.

(Reporting by Andrew Osborn and Nailia Bagirova, Writing by Andrew Osborn, Editing by Andrew Heavens and Angus MacSwan)

By Andrew Osborn and Nailia Bagirova