 In 1917, he was named on the General Staff of the Alpine Corps.On 13 March 1918 he was appointed commander of the 1st Bavarian "Jägerbattailon", with whom he served in the Eastern Army Group in Turkey from 20 July to 15 October 1918.Shortly after the war, from 1 December 1918, Mayr acted as company commander in the 1st Bavarian Infantry Regiment in Munich.