Television images showed people bursting firecrackers and raising the tri-colour in the Masaldanga enclave.

At the stroke of midnight Friday, tens of thousands of stateless people who were stranded for decades along the poorly defined border between India and Bangladesh will finally get to choose their citizenship, as the two countries swapped more than 150 pockets of land to settle the demarcation line dividing them.

Television images showed people bursting firecrackers and raising an Indian flag in the Masaldanga enclave, which became part of India.

External Affairs Ministry in a statement described July 31 as a historic day for both India and Bangladesh as “it marks the resolution of a complex issue that has lingered since independence” from British colonialists in 1947.

Nearly 37,000 people lived in 111 Indian enclaves inside Bangladesh, while 14,000 lived in 51 Bangladeshi enclaves in India.These people are getting citizenship of their choice.

The boundary agreement between the two countries took effect at midnight on Friday.

Relations between India and its smaller neighbour Bangladesh have significantly improved since Bangladesh Prime Minister Sheikh Hasina promised that her administration would not allow India’s separatist insurgents to use the porous 4,000-kilometre border to carry out raids in India.

Aided by India, Bangladesh gained independence from Pakistan following a bloody nine-month war in 1971. The boundary dispute has been lingering since British colonialists carved Pakistan out of India in 1947, and granted independence to the two countries.

None from Bangladeshi enclaves within India opted for Bangladesh, while 979 people from Indian enclaves living inside Bangladesh applied for Indian citizenship, said Akhteruzzman Azad, chief government administrator at Kurigram district in Bangladesh.

The region is 240 kilometres north of Dhaka, the Bangladesh capital.

The shifting of the people to the Indian side would be completed by November this year.

The two neighbouring countries are implementing the Land Boundary Agreement in line with a deal signed in 1974, and approved by the Parliament recently.