The partition of India in 1947 was largely an attempt to quell sectarian violence in the country by splitting it into a majority Hindu India and a majority Muslim Pakistan. Mohandas Ghandi and others believed a unified state was a better solution, but the potential of becoming a permanent minority led the Muslim League and other groups to agitate for separation.
While the partition was largely drawn along pre-existing lines, many Muslims lived in the lands that became India, and many Hindus lived in territory that became Pakistan. The partition resulted in the largest mass migration in human history, in which over 14 million Hindus, Muslims and Sikhs were displaced by the redrawn lines and forced to move from their ancestral homes.
The partition also resulted in massive violence. Before, during and after the partition process, sectarian groups targeted one another in the affected areas. In the Punjab region alone, somewhere between 200,000 and 500,000 people died in retributive genocidal attacks leading up to the partition. As many as 83,000 women were abducted and raped by groups on either side, and despite the government's promise they would be recovered and restored to their families, very few ever made it home.