After the Japanese defeat in 1945, the region experienced a period of transition and upheaval during the Indonesian struggle for independence. During the Japanese occupation, and when the Indonesian nationalists declared independence on 17 August 1945, the city was renamed Jakarta. In 1945, it was briefly occupied by the Allies and returned to the Dutch. The Dutch name, Batavia, remained the internationally recognized name until Indonesian independence was achieved and Jakarta proclaimed the national capital on 27 December 1949.