why was india divided into two different countries when it won independence from britain?

India was divided into two different countries, India and Pakistan, when it won independence from Britain in 1947 due to religious and political conflicts between Hindus and Muslims.

The British colonial rulers pursued a "divide and rule" policy which exacerbated tensions between Hindus and Muslims. As the independence movement gained strength, communal violence between the two religious communities escalated, with both sides fearing domination by the other.

The Muslim League, led by Muhammad Ali Jinnah, demanded the creation of a separate Muslim state to safeguard the interests of Muslims in the subcontinent. They argued that Muslims would face discrimination and marginalization in a Hindu-dominated India.

In response to these demands, the British government proposed the partition of India along religious lines. The Indian National Congress, led by Mahatma Gandhi and Jawaharlal Nehru, initially opposed the partition, advocating for a united and secular India. However, mounting violence and the fear of civil war convinced them to reluctantly accept the partition plan.

The Indian Independence Act of 1947 was passed by the British Parliament, which formally partitioned the country into India and Pakistan. India became a secular state with a Hindu majority, while Pakistan was created as a separate Muslim-majority state, comprising two regions, East Pakistan (present-day Bangladesh) and West Pakistan (present-day Pakistan).

The partition process was marred by mass violence, riots, and forced migration of populations. It is estimated that around 15 million people were displaced, and hundreds of thousands lost their lives in the ensuing communal violence.

The division of India into two countries had long-lasting consequences, leading to ongoing tensions, conflicts, and border disputes between India and Pakistan.