NEW DELHI -- India said Friday it swapped more than 150 small pockets of land with its small neighbour Bangladesh, settling a decades-old border dispute and an uncertain future for tens of thousands of stateless people living in squalid conditions.

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

India's 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 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 (2,500 mile) 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 (150 miles) north of Dhaka, the Bangladesh capital.

The shifting of these people to the Indian side would be completed by November this year, said the statement by India's External Affairs Ministry.

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