During the Peninsular War, a popular uprising against the French occupation of Spain begins in Madrid, culminating in a fierce battle fought out in the Puerta del Sol, Madrid's central square. The Spanish rebels were defeated, and during the night the French army under Grand Duke Joachim Murat shot hundreds of citizens along the Prado promenade in reprisal. The gruesome events of the day were depicted by Spanish artist Francisco de Goya in two well-known prints.
On February 16, 1808, under the pretext of sending reinforcements to the French army occupying Portugal, French Emperor Napoleon Bonaparte invaded Spain. Thus began the Peninsular War, an important phase of the Napoleonic Wars fought between France and much of Europe between 1792 to 1815. During the first few weeks after their 1808 invasion of Spain, French forces captured Pamplona and Barcelona and on March 19 forced King Charles IV of Spain to abdicate. Four days later, the French entered Madrid under Joachim Murat. In early May, Madrid revolted, and on June 15 Napoleon's brother, Joseph, was proclaimed the new king of Spain, leading to a general anti-French revolt across the Iberian Peninsula.
In August, a British expeditionary force under Arthur Wellesley, later the Duke of Wellington, landed on the Portuguese coast to expel the French from the Iberian Peninsula. By mid 1809, the French were driven from Portugal, but Spain proved more elusive. Thus began a long series of seesaw campaigns between the French and British in Spain, where the British were aided by small bands of Spanish irregulars known as guerrillas. Finally, on June 21, 1813, allied forces under Wellesley routed the French forces of Joseph Bonaparte and Marshal Jean Jourdan at Vitoria, Spain. By October, the Iberian Peninsula was liberated, and Wellesley launched an invasion of France. The allies had penetrated France as far as Toulouse when news of Napoleon's abdication reached them in April 1814, ending the Peninsular War.