During the Second World War Blamey commanded the Second Australian Imperial Force and the I Corps in the Middle East. In the latter role he commanded Australian and Commonwealth troops in the disastrous Battle of Greece. In the former role, he attempted to protect Australian interests against British commanders who sought to disperse his forces on all manner of missions. He was appointed deputy commander-in-chief of Middle East Command, and was promoted to general in 1941. In 1942, he returned to Australia as commander-in-chief of the Australian Military Forces and commander of Allied Land Forces in the South West Pacific Area under the command of General Douglas MacArthur. On the orders of MacArthur and Prime Minister John Curtin, he assumed personal command of New Guinea Force during the Kokoda Track campaign, and relieved Lieutenant General Sydney Rowell and Major General Arthur Allen under controversial circumstances. Blamey also planned and carried out the significant and victorious Salamaua–Lae Campaign. Nonetheless, during the final campaigns of the war he faced vociferous criticism of the Army's performance. He signed the Japanese Instrument of Surrender on behalf of Australia at Japan's ceremonial surrender in Tokyo Bay on 2 September 1945, and later personally accepted the Japanese surrender at Morotai on 9 September. He was promoted to field marshal in June 1950.