After the second battle for Gaza in April 1917, Kress von Kressenstein commander of the victorious 3rd, 16th and 53rd Divisionswas reinforced by the 7th and 54th Divisions. The 7th Infantry Division (later part of the Eighth Army) had experienced four months of strategic movement, similar to that of the 54th Division. Having arrived at Jerusalem, in early May the 20th Infantry Regiment began company-level training. After moving to Beersheba where they remained in reserve, they participated in theatre-specific training until late June, when they went into the front line. Training in fortification, reconnaissance, and counter–reconnaissance continued. The 21st Infantry Regiment received similar training, and on 6 August the regimental colours of the 20th and 21st Infantry Regiments were awarded military medals for service in the Gallipoli Campaign. At Beersheba on 28 June, the 7th Infantry Division inactivated the fourth company of each infantry battalion, before activating a machine gun company armed with light machine guns, in every infantry battalion on 10 August. Every Ottoman infantry division in Palestine repeated this reorganisation, with one quarter of their rifle strength being replaced by light machine guns, considerably increasing their fire power and strengthening their offensive and defensive capabilities. Following orders from von Kressenstein commanding the Gaza to Beersheba line defences, assault detachments equivalent to the German "Stosstruppen" (Stormtroopers) were formed. The 7th Division activated an assault detachment of fifty men on 17 July 1917.