Jubilant crowds have celebrated as Bangladesh and India swapped hundreds of pockets of land along their poorly defined border, while giving tens of thousands of people the chance to choose their citizenship after being stateless for nearly seven decades.
At one minute past midnight on Saturday, television images showed people bursting firecrackers and raising an Indian flag in the Masaldanga enclave, which became part of India.
On the other side of the new border, thousands of people who have been living in the enclaves in Bangladesh cheered, danced and chanted "Bangladesh, Bangladesh."
Related Story: India and Bangladesh seal land-swap deal
"We have been in the dark for 68 years," said Russel Khandaker, 20, as he danced with friends in the Dashiar Chhara enclave, which belonged to India but has now became part of Bangladesh.
"We've finally seen the light," he told AFP news agency.
Residents carried out the celebration despite heavy rains, marching through muddy roads in Dashiar Chhara.
A total of 162 tiny pockets of land - 111 in Bangladesh and 51 in India - were officially handed over to the countries surrounding after Dhaka and New Delhi struck a border agreement in June.
The land-swap means some 50,000 people who have been living in the isolated enclaves since 1947 will now become part of the countries that surround their homes.
Officials from Bangladesh and India hoisted their respective national flags over their new territories on Saturday morning in formal ceremonies.
Shafiqul Islam, chief government administrator in northern district of Debiganj, said Bangladesh would now roll out a "fast-track master plan" to develop the enclaves, including building new infrastructure.
Torches and fire crackers
India has added more than 15,000 new citizens to its population, while over 36,000 enclave residents took Bangladeshi nationality under the historic agreement.
In West Bengal state's Mashaldanga enclave, the main site for celebrations on the Indian side, residents have for decades lived as Bangladeshis in the foreign land.
Having opted for Indian citizenship under the deal, they rallied with torches, let off fire crackers and hoisted the Indian flag to celebrate their "freedom".
Mamata Banerjee, chief minister of West Bengal, where most of the enclaves were swapped, hailed the agreement in a tweet.
"Thousands of people will get new identities. Congratulations to them," Banerjee said on Twitter.
Local ruling politician Rabi Ghosh said his government's priority is to reach out to his new compatriots and to see their children go to schools and sick get treated at hospitals.
The disputed enclaves date back to ownership arrangements made centuries ago between local princes.
The parcels of land survived partition of the subcontinent in 1947 after British rule, and Bangladesh's 1971 war of independence with Pakistan.
Bangladesh endorsed a deal with India in 1974, but India only signed a final agreement in June when Prime Minister Narendra Modi visited Dhaka.