On 1 December 1942 Leyser assumed command of the XXVI Army Corps. Almost a year later, he was assigned to lead the XV Mountain Army Corps, which was fighting against Yugoslav partisans in Croatia. On 20 July 1944 (coincidentally, the day of the failed assassination of Adolf Hitler) he switched command with General Gustav Fehn, commander of the XXI Mountain Army Corps (Germany) in the Balkans.