When Emperor Napoleon defeated Archduke Charles at the Battle of Eckmühl on the Danube, Archduke John was thrown on the defensive. The archduke assigned elements of Gyulay's corps to defend Dalmatia and other places. At the Battle of the Piave on 8 May, Gyulay led a considerably reduced IX Armeekorps of 12,720 men. As at Sacile, his brother Albert Gyulay led the VIII Armeekorps. Later, he defended Kranj in Carniola with 14,880 soldiers. After Eugène's army passed to the east in pursuit of Archduke John's army, Gyulay operated against Graz. On 25 June, his 22,000 troops attacked Jean-Baptiste Broussier's division which was besieging Graz. Broussier retreated into the hills and successfully defended himself until the arrival of Auguste Marmont's corps on the 27th. Gyulay was able to reprovision the Graz garrison before he withdrew. In the fighting, many of the hastily raised Austrian Landwehr and Hungarian insurrections militia fled the field. However, Gyulay's Austrian line infantry fought hard and suffered 164 dead and 816 wounded and captured. Reports of French casualties range from 263 to 900.