At the outbreak of the third Italian war of independence the V Army Corps remained at first in Florence, but when the main Italian army failed to break through the Austrian Quadrilatero fortress system south of Lake Garda in the Battle of Custoza, the corps marched six divisions over the Apennine mountains, joined up with General Enrico Cialdinis eight divisions of the IV Army Corps in the Romagna and crossed the lower Po and Adige rivers in force on 11 July 1866. Bypassing the Austrian fortresses and main army on his left flank Cialdini marched his army all through the Veneto, dispatching one division under Giacomo Medici to invade Trentino and cut the Austrian line of retreat and three divisions under Raffaele Cadorna to march at speed to the city of Trieste. Cialdinis army reached the Isonzo river on 24 July 1866.