Before, during and soon after World War II, Britain realised it was time to quit India after nearly 300 years. Because of a perceived problem for the minority Muslim population as advocated by the leader of the Muslim League, Mr Jinnah, Britain decided that the safest option or the Muslim minority was to partition British India into India and two parts of Pakistan - West Pakistan and East Pakistan. The latter being the eastern half of Bengal which had, for some strange reason a majority of Muslims.
There were several problem states: most concerned 'princely states' where the population was of one faith and the ruler of the other, such as Hyderabad a Hindu-majority state with a Muslim ruler. In all cases, common-sense prevailed and the ruler opted for the country which was geographically most sensible. But Jammu and Kashmir to the north had large Muslim majorities but with Hindu rulers. Unfortunately, the rulers couldn't decide by the given deadline. Consequently, Pakistan militarily took over the half nearest its borders and India the other half. As we know, the problem has yet to be resolved over 60 years after Independence.
But the worst problem was that despite the best intentions, partition directly caused the displacement (to quote Wikipedia - http://en.wikipedia.org/wiki/Partition_of_India "up to 12.5 million people in the former British Indian Empire, with estimates of loss of life varying from several hundred thousand to a million (most estimates of the numbers of people who crossed the boundaries between India and Pakistan in 1947 range between 10 and 12 million). The violent nature of the partition created an atmosphere of mutual hostility and suspicion between India and Pakistan that plagues their relationship to this day."
See also - http://chindia-alert.org/historical-perspectives/2-2i-indias-20c-timeline/
The Law of Unintended Consequences struck again. One could even say that a variant: "The Law of Opposite to that Intended " struck.