On February 20, 1947, Clement Attlee, British Premier, declared that the British would quit India in June 1948.
The ecstasy of coming independence was marred by the large-scale communal riots during and after August 1946. The Hindu and Muslim communalists blamed each other for starting the heinous killings and competed with each other in cruelty.
Lord Louis Mountbatten, who had come to India as Viceroy in March 1947, worked out a compromise after long discussions with the leaders of the Congress and the Muslim League: the country was to be free but not united.
India would be partitioned and a new state of Pakistan would be created along with a free India.
The nationalist leaders agreed to the partition of India in order to avoid the large-scale blood bath that communal riots threatened. But they did not accept the two-nation theory.
The nationalist leaders did not agree to hand over one-third of the country to the Muslim League as the latter wanted and as the proportion of the Muslims in Indian population would have indicated.
The national congress agreed to the separation of only those areas where the influence of the Muslim League was predominant.
In the North Western Frontier Province, and the Sylhet district of Assam where the influence of the League was doubtful, a plebiscite was held.
The Indian nationalists accepted the partition not because there were two nations in India - a Hindu nation and a Muslim nation, but because of the historical development of communalism, both Hindu and Muslim. In last 70 years, the communalism had created a situation where the alternative to partition was mass killing of lakhs of innocent people in senseless and barbaric communal riots.
The announcement that India and Pakistan would be free was made on 3 June 1947.
On 15 August 1947, India celebrated with joy its first day of freedom.
After the independence, the princely states were given the choice of joining either of the new states (i.e. India or Pakistan).
Under the pressure of the popular states’ people's movements and guided by the masterful diplomacy of Sardar Patel (the Home Minister), most of the princely states acceded to India.
The Nawab of Junagadh, the Nizam of Hyderabad, and the Maharaja of Jammu and Kashmir held back for some time.
The Nawab of Junagadh, a small state on the coast of Kathiawar, announced accession to Pakistan even though the people of the state desired to join India. In the end, Indian troops occupied the state and a plebiscite was held, which went in favor of joining India.
The Nizam of Hyderabad made an attempt to claim an Independent status, but was forced to accede in 1948 after an internal revolt had broken out in its Telengana area and then Indian troops had marched into Hyderabad.
The Maharaja of Kashmir also delayed accession to India or Pakistan even though the popular forces led by the National Conference wanted accession to India. However, he acceded to India in October 1947 after Pathans and irregular armed forces of Pakistan invaded Kashmir.