In the summer of 1944, after eight months of forced retirement, Heinrici was sent to Hungary and placed in command of the 1st Panzer Army; as well as the Hungarian First Army which was attached to it. He was able to keep the 1st Panzer Army relatively intact as it retreated into Slovakia. Later in 1944 during the Battle of the Dukla Pass, the 1st Panzer Army prevented Soviet forces from linking up with Slovak rebel forces of the concurrent Slovak National Uprising. Heinrici was awarded the Swords to the Oak Leaves of his Knight's Cross on 3 March 1945.