Why was India divided into two different countries when it won independence from Britain

India was divided into two countries, India (mostly Hindu-majority) and Pakistan (mostly Muslim-majority), when it won independence from Britain in 1947 due to several factors, including:

1. Religious Divide: The demand for a separate Muslim state grew due to religious tensions between the Hindu and Muslim communities in India. Muslim leaders argued for the creation of Pakistan to safeguard the rights and interests of the Muslim population.

2. Two-Nation Theory: The concept of the "two-nation theory" proposed by Muslim political leader Muhammad Ali Jinnah stated that Hindus and Muslims were two distinct nations with different cultural, social, and political aspirations. It was believed that a separate Muslim state would better protect the interests of Muslims.

3. Communal Riots: The communal violence and riots that erupted during the partition of Bengal in 1905 and Punjab in 1947 heightened the fears of further Hindu-Muslim conflicts. British colonial authorities feared that maintaining a united India would result in more violence between the two religious communities.

4. Political Negotiations: The negotiations between Indian political leaders, Muslim League, and the British government led to the agreement for the partition. The British wanted a smooth transition of power but faced mounting pressure from various political groups, resulting in the acceptance of the partition plan.

However, the partition resulted in widespread violence, displacement, and loss of lives on both sides of the newly created countries. Millions of people had to migrate across borders, leading to one of the largest mass migrations in history.