Eventually winning back imperial favour, he did not return to the State Council (Conseil d'État), and from 1808 to 1810 he commanded a division in Spain (during the Peninsular War). He distinguished himself at the Battle of Ocaña, at the Passage of Sierra Morena, and at Despena-Perros. He also captured Cordoba, where he governed in a manner "to reconcile hearts".