Gandhi publicly announced that he was against the Second World War as it broke out in 1939. Whereas he had asked for support for Britain in South Africa and during the First World War, he now called for a boycott. The Indians should not support Britain in this war. In 1942 the cry of "Quit India" emerged. The Indians would withhold their support to the War, unless they were granted independence. For this campaign Gandhi was arrested once again. He was isolated from the other Satyagrahis and imprisoned in the Aga Khan Palace. Kasturbai died during this detention.
Because of the looming threat of an invasion of India by the Japanese in 1942, the British needed Indian support and were prepared to make concessions. Independence for India, however, was never what the British Prime Minister Churchill really had in mind. Gandhi was released in 1944. Independence was only granted in 1947 after the war was over and by the new British Labour government, but only in form of two separate states: Muslim Pakistan and Hindu India. Although Gandhi devoted all his strength to it, he was not able to move either Muslims or Hindus, nor the British to agree on founding one common state. The religious groups started migrations of peoples into the new states. Violent unrest ensued. Gandhi tried to restore peace. In 1947/48 he moved to Calcutta and other embattled cities and tried to mediate. Peace seemed impossible. Once again he decided to fast until death. His health seemed to be at serious risk. Neither religious group wanted to be responsible for Gandhi's death and concluded peace (for a short period of time). In taking this action he focused the hatred of fanatics on both sides toward himself.
Gandhi was murdered on the 30th January 1948 by a fanatical Hindu. He died with the word of God crossing his lips.