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.