Following the French invasion of 1808, Ballasteros took command of a regiment from the "Junta General del Principado de Asturias" and attached himself to the Army of Galicia under Blake and Castaños. After Napoleon's defeat of the Spanish popular armies and the subsequent French invasion of Andalusia, Ballasteros carried on operations against Marshal Soult in the south of Spain. With Blake and Zayas, he commanded the Spanish divisions that resisted every blow at the Battle of Albuera. His forces liberated Málaga in August 1812.