Azerbaijani forces on Tuesday moved into the final district given up by Armenia in a peace deal that ended weeks of fighting over the disputed Nagorno-Karabakh region.
Azerbaijan's defense ministry released a video showing a tank flying an Azerbaijani flag leading a column of trucks into the Lachin district.
AFP journalists in Lachin town saw a column of Azerbaijani trucks flanked by military vehicles from Russia, which brokered the peace settlement.
Armenia agreed to hand over three districts around Karabakh - Aghdam, Lachin and Kalbajar - as part of the deal that stopped an Azerbaijani offensive that had reclaimed swathes of territory lost to Armenian separatists in a 1990s war.
Like in Aghdam and Kalbajar, residents of Lachin cleared out frantically ahead of the handover, taking livestock, firewood, furniture and even plastic water pipes.
Some residents have burnt their homes as they left, and on Monday evening two houses on the outskirts of Lachin town were in flames.
Local official Davit Davtyan said residents had been given until 6:00 pm to leave, except those allowed to stay along the Lachin corridor that runs to Armenia's border.
The peace deal saw some 2,000 Russian peacekeepers deployed between the two sides and along the corridor, a 60-kilometre (35-mile) route through Lachin that connects Karabakh's main city Stepanakert to Armenia.
The column of a dozen Azerbaijani military trucks was moving slowly overnight along the corridor in the direction of the Armenian border, with Russian military vehicles at the head and rear.
Davtyan said some 200 people would be allowed to stay to maintain local infrastructure.
"Residents who were not able to leave because they had nowhere to go said they would stay and see what happens on Tuesday," he said.
Nagorno-Karabakh broke from Azerbaijan's control in a war after the 1991 collapse of the Soviet Union that left some 30,000 dead.
The region declared independence but it was never recognized by any country, including Armenia which strongly backs the separatists.
The peace accord signed on Nov. 9 was reached after six weeks of fighting that saw Azerbaijan's army overwhelm separatists forces and threaten to advance on Stepanakert.
Under the agreement, Armenia is losing control of seven districts that it seized around Karabakh in the 1990s - many Azerbaijanis who were forced to flee are now planning to return.
The separatists are retaining control over most of Karabakh's Soviet-era territory but have lost the key town of Shusha.
While some Armenians have been fleeing the districts ceded to Azerbaijan, others in Lachin had nowhere to go.
In the village of Aghavno along the Lachin corridor, 60-year-old Araksya Gyokchakyan watched residents load furniture and firewood into cars and trucks even as she was set on remaining behind.
"I don't know where to go. I stayed here during the war. It's my home," she told AFP.
Meanwhile other Armenians have been returning to Karabakh itself.
Russia's defense ministry, which is helping with the returns, said on Monday that more than 25,000 people who fled the fighting had been brought back.
Moscow's peacemaker role has overshadowed France and the United States - the three countries that form the Minsk Group, which led talks on the Karabakh conflict for decades but failed to achieve a lasting agreement.
France's position in future negotiations may be further under threat after Azerbaijani lawmakers last week demanded the country be expelled from the Minsk Group.
The move came after the French Senate adopted a non-binding resolution calling on France to recognise Karabakh as an independent state.
Azerbaijan has also called for its staunch ally Turkey to play a role in the peacekeeping mission, but Moscow insists Ankara will not be involved.
Since the announcement of the peace deal - which leaves Karabakh's future political status in limbo -Armenian Prime Minister Nikol Pashinyan has been under fire at home.
Protesters have regularly taken to the streets of the capital Yerevan, branding him a "traitor" for agreeing to the deal and demanding his resignation.
Demonstrators rallied again on Monday, including outside the French embassy in Yerevan, appealing for help in finding soldiers still missing after the fighting.
While Armenia has reported more than 2,300 military casualties, thought to be an underestimate, Azerbaijan has not disclosed any military losses.
More than 100 civilians were reported killed on both sides.