After the Japanese surrendered in 1945, ending World War II, Sukarno proclaimed the independence of Indonesia on 17 August 1945, and became the nation's first president. While the Japanese soon left the former Dutch East Indies, the Dutch returned to reclaim former colonies in 1946. Indonesian militias fought the Dutch for three years in the Indonesian National Revolution. One of the militias—the Siliwangi Division of the Indonesian Army, based in West Java—was led by Kartosuwirjo, who had initially supported the Japanese during their three years of occupation.