In February of 1947, the British government announced that India would be granted independence by June 1948. Viceroy for India Lord Louis Mountbatten pleaded with the Hindu and Muslim leadership to agree to form a united country, but they could not. Only Gandhi supported Mountbatten's position. With the country descending further into chaos, Mountbatten reluctantly agreed to the formation of two separate states, and moved the independence date up to August 15, 1947.
With the decision in favor of partition made, the parties next faced this nearly impossible task of fixing a border between the new states. The Muslims occupied two main regions in the north on opposite sides of the country, separated by a majority-Hindu section. In addition, throughout most of northern India members of the two religions were mixed together - not to mention populations of Sikhs, Christians and other minority faiths. The Sikhs campaigned for a nation of their own, but their appeal was denied.
In the wealthy and fertile region of the Punjab, the problem was extreme with a nearly-even mixture of Hindus and Muslims. Neither side wanted to relinquish this valuable land, and sectarian hatred ran high. The border was drawn right down the middle of the province, between Lahore and Amritsar. On both sides, people scrambled to get onto the "right" side of the border, or were driven from their homes by their erstwhile neighbors. At least 10 million people fled north or south, depending upon their faith, and more than 500,000 were killed in the melee. Trains full of refugees were set upon by militants from both sides, and all the passengers massacred.
On August 14, 1947, the Islamic Republic of Pakistan was founded. The following day, the Republic of India was established to the south.
On January 30, 1948, Mohandas Gandhi was assassinated by a young Hindu radical for his support of a multi-religious state. Since August of 1947, India and Pakistan have fought three major wars and one minor war over territorial disputes. The boundary line in Jammu and Kashmir is particularly troubled. These regions were not formally part of the British Raj in India, but were quasi-independent princely states; the ruler of Kashmir agreed to join India despite having a Muslim majority in his territory, resulting in tension and warfare to this day.
In 1974, India tested its first nuclear weapon. Pakistan followed in 1998. Thus, any exacerbation of post-Partition tensions today could be catastrophic.