On Foy's return, the expedition against
Portugal was preparing. He received a command in the artillery under Maj-Gen
Jean-Andoche Junot in the first French invasion of Portugal. During the occupation of Portugal, he filled the post of inspector of forts and fortresses. He was severely wounded at the
Battle of Vimeiro. After the
Convention of Cintra, he returned to France, and with the same army proceeded to
Spain. In November 1808, he was promoted to general of brigade and fought under the command of Marshal
Nicolas Soult at the
Battle of Corunna. In early 1809, he led a brigade under Soult in the
second French invasion of Portugal. When commanded to summon the
Bishop of Porto to open the gates of
Porto, he was seized, stripped by the populace and thrown into prison. He escaped with difficulty. At the
Second Battle of Porto, he alertly spotted
Arthur Wellesley's surprise river crossing. Leading the 17th Light Infantry in a futile attempt to drive the British back, Foy was wounded. Foy was wounded again while leading his brigade at the
Battle of Bussaco during the third French invasion of Portugal. In 1810, he made a skilful retreat at the head of 600 men, in the face of 6,000 Spaniards, across the Sierra de Caceres. Early in 1811, he was selected by Marshal
André Masséna to convey to the emperor the critical state of the French army before the
Lines of Torres Vedras. This commission, though one of great peril — the country being in a complete state of insurrection — Foy successfully accomplished, for which he was promoted to
divisional general. ==Service in Spain==