On 10th May 1808 Joseph Bonaparte, Napoleon's brother and the King of Naples, was crowned King of Spain after bloody confrontations between the Spanish people and French troops. Goya depicted these terrible events in some of his best paintings. The Spanish King, [Ferdinand VII#PERSONAS#29], was held in Valençay. Meanwhile a war to free the country of the occupying French forces was sparked off in the Peninsula which came to be known as the Spanish War of Independence. After six years of conflict the French army was defeated and at the height of the Napoleonic Empire's collapse Ferdinand VII returned to Spain in 1814, after having signed the Treaty of Valençay in 1813 with Napoleon, which recognised Ferdinand as the legitimate King of Spain.