At the time of the Napoleonic Wars, Spain was only a shadow of its former power. Spanish troops and leaders, as many Napoleonic historians point out, performed badly on a large number of occasions.
Yet there are a number of battles, Bailen, Tamames, Alcaniz and San Marcial where the Spaniards fought valiantly and gained victory. Ironically, the point most historians overlook is the fact that the Spanish armies constituted a threat that the French simply could not ignore.
As good as Wellington’s Anglo-Portuguese field army was, that army faced multiple French armies. They could only defeat one French army at a time. The Spanish Armies and the accompanying guerrilla warfare against French troops tied down the remainder, allowing the Anglo-Portuguese army to ultimately emerge victorious.