After France had succesfully ousted Austria, Russia and Prussia in the fight for dominance of continental Europe, only Britain remained as a serious contender. And indeed, through the victory at Trafalgar in 1805, Lord Nelson had secured the British Isles from the threat of invasion.

Emperor Napoleon Bonaparte instead turned his attention to Spain. In 1807 over 100.000 french soldiers marched over the Spanish border under the pretext that they were on their way to invade Portugal. The real goal was to depose the Spanish monarch Fernando VII, and instead put the Emperor's brother, Joseph Bonaparte, on the throne. This resulted in a massive uprising however, which caused Britain to ally itself with its former enemy Spain and send troops of its own to the Iberian Peninsula.

The British expeditionary force landed in Portugal in August 1808 and through winning the Battle of Vimeiro managed to force the French army to evacuate the country. After two years of fighting and losses on both sides, the French eventually tried to retake Portugal in September 1810. Wellington, who commanded the British forces, was pushed back to Torres Vedras, where the fighting came to a standoff. When fresh reinforcements arrived in May 1811 he was able to force the French out of Portugal once again.

In the beginning of 1812 the British army attacked Spain, aided by both Spanish regular and guerilla forces. The French were experiencing problems on the eastern front, where the invasion of Russia had failed and Prussia had risen and allied with Russia. This meant no reinforcements to the western front. Wellington had no such problems however, and in June 1813 won a decisive victory at Vitoria. At this time, Austria once again entered the war against France. Things were starting to look rather bleak for Napoleon.

British troops entered France in October. The French defence was formidable, but Paris was captured at last in March 1814. Napoleon abdicated unconditionally on April 11 and was exiled to the island of Elba.

A lot of information taken from, a site which I heartily recommend.