On 17 August 1945, Sukarno proclaimed the independence of Indonesia, which had been a Dutch colony, and then had been occupied by the Japanese since 1942. The Dutch wished to retain control, and an armed conflict broke out. In November 1946, following international pressure, the Indonesians and Dutch signed the Linggadjati Agreement, in which the Dutch recognized Indonesian "de facto" authority over Java and Sumatra and both sides agreed to cooperate in the establishment of a United States of Indonesia comprising the Republic, Borneo and eastern Indonesia. However the Dutch began creating federal states unilaterally, beginning with the State of East Indonesia in December 1946. By July 1947, the cost to the Dutch of maintaining military forces in Indonesia and the desire to regain access to the resources of Java and Sumatra led the decision to attack the Republic. At midnight on 30 July 1947, the Dutch launched a "Police Action", and took control of West Java and Madura as well as the areas around Semarang, Medan and Palembang.