The first three of battalion's constituent companies had been formed in Australia - in New South Wales, Victoria and Queensland - in February 1916 during a period when the AIF was being expanded in preparation for its transfer to the Western Front following the end of the disastrous Gallipoli Campaign. At that time they had been assigned to the 9th, 10th and 11th Brigades respectively, arriving in the United Kingdom in mid-1916. These companies had undertaken advanced training with the 3rd Division on Salisbury Plain in the United Kingdom as the division was prepared for the rigours of trench warfare, before arriving on the Western Front in late 1916. They had subsequently taken part in the fighting around Messines and Ypres in 1917. The 23rd Machine Gun Company, however, had been formed in England in January 1917. The company was briefly re-designated as the 16th Machine Gun Company as part of plans to raise the 16th Brigade, but returned to its original designation in August 1917 when the 16th Brigade was disbanded without having seen combat due to manpower shortages. When the decision was made to assign an extra company at divisional level so that each division had four companies, the company was assigned to the 3rd Division.