The Australian 7th infantry division was formed as part of the 2nd AIF in February 1940 with Sir John Lavarack as its Commander and originally consisted of the 20th and 21st Australian Infantry Brigades. Both these brigades were sent to the Middle East in October 1940 where the 19th Brigade was designated to join them division on the division's arrival in the Middle East but left to join the 6th Australian Division in November 1940. The 18th Brigade joined The Australian 7th Division on its arrival to the Middle East from England. The 20th brigade was transferred to the Australian 9th Division in January 1941 and was replaced by the Australian 25 Infantry brigades, which had been formed from the 18th brigade with some other spare troops. Over the next two months the Australian 7th Division was concentrated in Palestine. .
The Australian 7th Division invaded Syria on the 8th June with out the 18th, which was defending Tobruk. They were assisted by one Indian and two Free French brigades to perform the attack that was to follow three routs, the direct road and through the mountains to Damascus and the coast road to Beirut. The Vichy French fought courageously, but by 15 June the allied force had reached the line Kiswe-Merdjayoun-Jezzine-Sidon. Despite a strong Vichy counter-attack in the vicinity of Merdjayoun, Damascus was captured on 21 June. Fighting continued until 12 July when the Vichy French were granted an armistice. This campaign resulted in 1600 Australian casualties, including 416 killed in action. .
Following the entry of Japan into the war on 7 December 1941, the Australian 6th and 7th Divisions returned to Australia so that it could move to New Guinea. The Australian 9th Division remained in the Middle East. Head quarters were established at Port Moresby and the division went straight into action to halt the Japanese advance. The 21st Brigade fought a bitter campaign of attrition on the Kokoda Track, until replaced by 25th Brigade who slowly forced the Japanese northwards.