The war originated from Napoleon's wish to extend the Continental system throughout Europe. Apart from smuggling, which was rife, Portugal remained the only country that would still openly accept British imports. To prevent this Napoleon planned to invade Portugal by first taking control of Spain and then controlling the whole of the Iberian Peninsular. In November 1807 General Junot led a French army through Spain and into Portugal occupying Lisbon on 1st December 1807. The Portuguese Royal family fled to Brazil, at that time a Portuguese colony and appealed to Britain for help. Napoleon then over played his hand, as he was to do often in the future, sending Marshal Murat into Spain with a large French army in March 1808. Following Napoleon's wishes the weak Spanish King Charles IV and his son were deposed and Napoleon's brother Joseph was 'elected' to the Spanish throne. By May many insurrections had broken out against French Rule. These were Guerrilla or small wars and although this form of warfare has existed for thousands of years it is from this period that we get the term Guerrilla warfare. With the regular Spanish forces largely ineffective this became the only form of warfare left to the Spanish people, it was characterized by acts of brutality by both sides, but was to create the conditions for future British victories and finally led to the liberation of Spain many years later.
In June/August 1808 the Spanish city of Saragossa held out against French attempts to recapture it after a local uprising. This was quickly followed by the surrender of Gen Dupont's French army at Baylen. For the time being Junot was cut off in Portugal and to make matters worse for the French a British expeditionary force under the temporary command of Sir Arthur Wellesley (later to become the Duke of Wellington) landed in Portugal on 1st August 1808. Wellesley quickly gained two victories, first at Rolica on 17 August 1808 and then at Vimerio (or Vimiero) on 21st August 1808, but these gains were reversed when his superiors arrived (the inept Hew Dalrymple and Harry Burrard). Still believing in war as the sport of nobility these two foolishly signed the Convention of Cintra which by allowing Junot's army home in British ships caused an outrage back home. All three British Generals were recalled home but only Wellesley was cleared.
While this was taking place Sir John Moore had taken command of the British Army in Portugal and started working much more closely with the Spanish. The Spanish were not yet ready to move from insurgency to conventional war and when Moore advanced into Spain he found himself facing the French alone. To make matters worse Napoleon himself led the French armies. Napoleon quickly retook Madrid and forced the British into a terrible retreat through the Spanish mountains. Convinced the war in the Peninsula was over, Napoleon left Marshall Soult to finish Moore off and returned to France as 1809 began to prepare for war against Austria. Moore was far from finished and he made a stand at Corunna defeating Soult on 16th January although Moore died during the battle the remains of the British Army were able to escape by sea.
Lisbon was still free from French control and became the base of British operations when Wellesley returned, now with Portuguese allies under the command of William Beresford. Soult crossed into Portugal in the spring of 1809 but was defeated again by Wellesley at Oporto on 12th May. Wellesley now advanced into Spain with Spanish allies who proved unreliable. When Marshal Victor and Joseph Bonaparte attacked at Talavera on 28th July 1809 they took no active part in the battle at all. Despite this Wellesley defeated the French but determined not to make Moore's mistake retreated back into Portugal until he could be sure of his Spanish allies and was better prepared. For Talavera Wellesley became known as Wellington as his reward, but would not become a Duke until 1814. The remains of the Spanish army were forced back to defend Cadiz as the free capital of Spain while Wellington prepared defences in Portugal for the expected French invasion. These became known as the Lines of Torres Vedras.
By early 1810 two French armies were on the border, the Army of Portugal under Marshall Andre Massena and the Army of Andalusia under Marshall Soult. The personal dislike both men had for each other was to prevent any coordinated action. In July 1810 Massena advanced and was defeated by Wellington at Buscao on 27th September. Wellington refused to be draw out from his defences by this victory and Massena's forces spent a long harsh winter starving outside the British and Portuguese lines. Despite unsuccessful French attempts to retake Cadiz by 1811 the situation in the Peninsular had changed very little. Wellington defeated Massena again at Fuentes de Onoro in May 1811 and the Allied army under Beresford attacked the border fortress of Badajoz with little success and much butchery. Elsewhere Spanish regulars and irregulars suffered set backs at the hands of the French including their defeat at Valencia on 9th January 1812, proving once again that insurgents have little chance of repelling invaders until they are able to fight and win a conventional war.
In January of 1812 Wellington decided that it was the right time to go on the offensive. First he took the two border forts which were the gateway to Spain, Ciudad Rodrigo (19th Jan) and Badajoz (19th April). Lacking any real siege train, or the time to reduce the fortresses through starvation these were taken by bloody assaults. Wellington continued to make his name defeating Massena's replacement Marshall Marmont at Salamanca on 22 July. Madrid was briefly liberated but the lack of siege train this time made taking Burgos impossible and Wellington retreated back to Portugal rather than risk being cut off by superior French forces. Although forced back into Portugal the Peninsular war had turned in favour of the British. Wellington had made his reputation, smashing all the French Marshals and armies sent against him and just as importantly Napoleon had drained Spain of the best of the French forces for the invasion of Russia. Napoleon had expected to return to Spain after the Russians had been dealt with and crush the British forces but of course few of his troops returned from the lethal 1812 campaign.
In 1813 Wellington led a much more confident Allied army into Spain, once again facing Joseph Bonaparte and once again smashing the French army, this time at the battle of Vittoria on 21st June 1813. Marshal Suchet tried to hold the mountain passes but after several hard fought engagements Wellington's army entered France. Wellington's army drove northwards, defeating Soult at Orthez in February 1814 and capturing Bordeaux. The last battle of the Peninsular war was fought at Toulose on 10th April 1814 where Soult was once again defeated. Sadly this was a pointless battle and wasted many lives needlessly as Napoleon had abdicated on 6th April 1814, but the news had yet to reach the combatants in the south. The Peninsular war proved a fatal drain to Napoleon's resources both in his time and in men and materials. It also helped forge a British army capable of beating the French and proved British commitment to the war against Napoleon to the European Allies throughout this turbulent period. Most importantly it brought to the fore one of the great Generals of the period, the duke of Wellington, although it is important to note that Wellington and Napoleon never fought against each other during this campaign - that would have to wait until the Hundred Days campaign and Napoleon's last desperate gamble.