Before the Second World War, the British Government handled most of Australia's foreign policy. The critical decision during the war was to more closely align the military and the diplomacy with the United States. The first accredited diplomat sent to any foreign country was Richard Casey, appointed in January 1940. Since 1941, United States has been the most important ally and trading partner. Australian concluded an agreement in 1944 with New Zealand dealing with the security, welfare, and advancement of the people of the independent territories of the Pacific (the ANZUS pact). After the war, Australia played a role in the Far Eastern Commission in Japan and supported Indonesian independence during that country's revolt against the Dutch (1945–49).