The Japanese invasion and subsequent occupation of Indonesia during the second World War ended Dutch rule, and encouraged the previously suppressed Indonesian independence movement to go further. In May 1940, an early part of World War II, the Netherlands was occupied by the German Nazis. The Dutch East Indies declared a state of siege and in July, they redirected exports for Japan to the US and Britain. Negotiations with the Japanese aimed at securing supplies of aviation fuel collapsed in June 1941, and the Japanese started their conquest of Southeast Asia in December of that year as a result. That same month, factions from Sumatra asked the Japanese for assistance in a revolt against the Dutch wartime government. The last of the Dutch forces were defeated by Japan in March 1942.
In July 1942, Sukarno accepted Japan's offer to rally the public in support of the Japanese war effort. Sukarno and Mohammad Hatta were decorated by the Emperor of Japan in 1943. However, experience of the Japanese occupation of Indonesia varied considerably. Many who lived in areas considered important to the war effort experienced torture, sex slavery, arbitrary arrest and execution, among many other war crimes. Thousands taken away from Indonesia as war labourers suffered badly or died as a result of ill-treatment and starvation. People of Dutch and mixed Dutch-Indonesian descent were particular targets of the Japanese occupation, and were frequently looked down upon.
In March 1945, Japan organized an Indonesian committee (BPUPKI) on independence. At its first meeting in May, Supomo spoke of national integration and against personal individualism; while Muhammad Yamin suggested that the new nation should claim Sarawak, Sabah, Malaya, East Timor, and all the pre-war territories of the Dutch East Indies. The committee drafted the 1945 Constitution, which remains in force, although it has now become much amended as compared to the past. On 9 August 1945, Sukarno, Hatta, and Radjiman Wediodiningrat were flown to meet Marshal Hisaichi Terauchi in Vietnam. They were told that Japan's emperor, Koiso, intended to announce Indonesian independence on 24 August.