India says it has swapped more than 150 adversely-held enclaves with its small neighbor Bangladesh, settling a decades-old border dispute and an uncertain future for tens of thousands of 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 midnight Friday.