The Second World War changed everything. India was included in Britain's declaration of war against Germany and the Congress Party was livid at His Majesty's government's failure to consult them. Nehru would probably have argued in favour of participating in the anti-fascist struggle provided the British agreed to leave India once it was all over, and London would probably have regarded such a request as impertinent. As it was, the Congress governments of each province resigned. Gandhi, who despite his pacifism had acted as an efficient recruiting-sergeant for the British during the First World War, was less sure what to do this time. A hardline ultra-nationalist current within the Congress led by the charismatic Bengali Subhas Chandra Bose argued for an alliance with Britain's enemies, particularly Japan. This was unacceptable to Nehru and Gandhi. But when Singapore fell in 1942, Gandhi, like most observers, was sure that the Japanese were about to take India by way of Bengal and argued that the Congress had to oppose the British empire, whatever the cost, in order to gain a position to strike a deal with the Japanese. The wartime coalition in London sent Stafford Cripps to woo the Congress back into line. He offered its leaders a "blank cheque" after the war. "What is the point of a blank cheque from a bank that is already failing?" Gandhi replied. In August 1942 the Congress leaders authorized the launch of the Quit India movement. A tidal wave of civil disobedience swept the country. The entire Congress leadership, including Gandhi and Nehru, was arrested, as were thousands of organizers and workers. The Muslim League backed the war effort and prospered. Partition was the ultimate prize.
Pakistan was born out of a struggle waged largely by middle-class Muslim professionals and traders who feared they would be orphaned after the British left India. The Hindus would dominate politics and economics. Without access to power and money, the Indian Muslims would die on the vine. The demand for Pakistan was initially devised by the Muslim League as a bargaining chip to gain maximum concessions from the imperial power. Pakistan was achieved largely due to a combination of the Second World War, Congress Party intransigence, and Britain's hasty departure. The Muslim League had supported the British war effort, while Gandhi and Nehru had launched a civil disobedience movement demanding that the British "Quit India." Pakistan was the consolation prize received by the League for standing shoulder to shoulder with the raj during the war. Till 1946, however, Jinnah (i.e. Muhammed Ali Jinnah) was prepared for a constitutional settlement that preserved the unity of India, while accepting the principle of provincial autonomy. Gandhi, too, favoured the deal, and was even prepared to offer Jinnah the prime ministership of a united India, but the Congress high command overruled him.
The Muslims had arrived in India as conquerers. They saw their religion as infinitely superior to that of the idol-worshipping Hindus and Buddhists. The bulk of Indian Muslims were nonetheless converts: some forced and other voluntarily, seeking escape, in Kashmir and Bengal especially, from the rigours of the caste system.
Muslim nationalism in India was the product of defeat. Until the collapse of the Mughal empire at the hands of the British, Muslims had dominated the ruling class for over five hundred years. With the disappearance of the Mughal court in Delhi and the culture it supported, they were now merely a large religious minority considered by Hindus as lower than the lowest caste.
(I changed some words from black in the original to red. Had I not changed some words to red, it might have been difficult for people to find statements by the author pertaining to Gandhi.)