In 1799 he was appointed commander of the Austrian forces in Italy and Colonel-Proprietor of the Infantry Regiment N.34, a ceremonial position he held until his death. On 18 April 1799, Kray was promoted to Feldzeugmeister. In the 1800 campaign, Kray commanded the Austrian force on the Upper Rhine, charged with the defense of all approaches to Vienna through the German states. After being out-maneuvered by the French, he was disastrously defeated in five consecutive battles. After the Battle of Neuburg, the French acquired both shores of the river, and commanded access to the Danube waterway as far east as Regensburg. During the subsequent armistice, Emperor Francis II replaced Kray with his brother, Archduke John; Kray was discharged on 28 August 1800 and retired to Pest, Hungary. He died there on 19 January 1804. For all his victories, for his fierce competitiveness on the battlefield, the French soldiers referred to him as "Le terrible Kray, le fils cher de la victoire" and men from both sides attended his funeral in 1804.