Background:
Along with the attainment of freedom from the British, the Indian subcontinent (the part which was under the British rule) was partitioned into two independent nations- India and Pakistan. India was formed as a secular nation and Pakistan was a Muslim nation from the beginning. Pakistan constituted of two geographically separated parts, the East pakistan (presently Bangladesh) and the West Pakistan (present day Pakistan) with the republic of India separating them between hundreds of kilometres.
The political power was always with the western part, though the Eastern part of Pakistan was more densely populated and rich in resources. This caused a considerable level of ill-will and feeling of bitterness in the inhabitants of the East Pakistan . They formed a new political party called the Awami League under the leadership of Sheikh Mujibur Rehman and started revolting against the government asking for more autonomy for the Eastern part. But needs of the leaders from the East Pakistan were rejected and the Sheikh and other leaders were imprisoned.
The Pakistani army conducted several punitive actions in different parts of Bangladesh, leading to massive loss of civilian life. The Hindus were the centre of the attack and this caused 8 million refugees to run away to the neighboring India. The Prime minister of India, Mrs. Indira Gandhi believed that the only solution to this problem was to liberate East Pakistan. India started waiting for a trigger to attack Pakistan.
The War:
On 3rd December 1971, Pakistani airforce struck a number of Indian airfields in northern India. In the return, the Indian army entered the east Pakistan. The Prime minister of India, in an All India radio broadcast the same night declared officially that India is in a war with Pakistan.
The Indian force soon conquered the whole eastern Pakistan, which declared its independence as Bangladesh, on Dec. 6,
1971. A cease-fire was arranged in mid-December by the
United Nations, after Pakistan's defeat. Pakistan lost its eastern half, an army of 100,000 soldiers, and was thrown into political turmoil as soon as the war was over.
General Maneckshaw, the chief of the Indian army became a national hero in India. It took barely a week for the Indian army to reach till the deep of Eastern Pakistan. It's told that the Liberation troups in Bangladesh gave all support for the Indian army to advance.
Zulfikar Ali Bhutto emerged as the new leader of the republic of Pakistan, and Mujibur Rahman took charge as the first prime minister of Bangladesh.
Tensions between India and Pakistan were alleviated by the Shimla accord of 1972, and by Pakistan's recognition of Bangladesh in 1974.
But issues includiing the Kashmir dispute have been permanent causes for the periodically recurred tension between the two nations.
Note:
Most of my sources are Indian books and web sites. But I have tried to maintain a modest level of neutrality. If any of the statements sounds otherwise, please do let me know.