Knežević was given command of the 3rd Division in Ignaz Gyulai's IX Armeekorps at the outbreak of the War of the Fifth Coalition. His division consisted of Andreas Stoichevich's brigade of eight Grenz infantry battalions, two garrison battalions, and eight 3-pound cannons. However, the corps structure was immediately changed so that 10,000 troops under Johann Gabriel Chasteler de Courcelles could be sent to support the Tyrolean Rebellion. Meanwhile, Stoichevich was detached to fight against Auguste de Marmont in the Dalmatian Campaign. Knežević fought at the Battle of Graz on 24–26 June 1809.