On July 31st India and Bangladesh will exchange 162 parcels of land, each of which happens to lie on the wrong side of the Indo-Bangladesh border. The end of these enclaves follows an agreement made between India and Bangladesh on June 6th. The territories along the world’s craziest border include the pièce de résistance of strange geography: the world’s only “counter-counter-enclave”: a patch of India surrounded by Bangladeshi territory, inside an Indian enclave within Bangladesh. How did the enclaves come into existence?The enclaves are invisible on most maps; most are invisible on the ground too. But they became an evident problem for their 50,000-odd inhabitants with the emergence of passport and visa controls. Independent India and Bangladesh—part of Pakistan until 1971—each refused to let the other administer its exclaves, leaving their people effectively stateless.According to Reece Jones, a political geographer, the plots were cut from larger territories by treaties signed in 1711 and 1713 between the maharaja of Cooch Behar and the Mughal emperor in Delhi, bringing to an end a series of minor wars.It was partition, the division of India and Pakistan, that turned the enclaves into a no-man’s-land. The Hindu maharaja of Cooch Behar chose to join India in 1949 and he brought with him the ex-Mughal, ex-British possessions he inherited. Enclaves on the other side of the new border were swallowed (but not digested) by East Pakistan, which later became Bangladesh.