Foy commanded a division in Marshal Soult's army during the Battle of the Pyrenees in July 1813. After Soult's defeat at Sorauren, Foy saved his division and parts of other commands by retreating northeast over the Roncesvalles Pass.