Finally, with the help of the British under the duke of Wellington, the Spanish expelled the occupying forces.
The duke of Wellington helped Spain to evict its occupiers.