The Napoleonic Wars (1803–1815) were a series of conflicts fought between the First French Empire under Napoleon (1804–1815), and a fluctuating array of European coalitions. The Napoleonic wars originated from political matters pending from the French Revolution (1789–1799) and from the French Revolutionary Wars (1792–1802), specifically the War of the First Coalition (1792–1797) and the War of the Second Coalition (1798–1802), and produced a period of French domination of Continental Europe. There were seven Napoleonic Wars, five named after the coalitions that fought Napoleon, plus two named for their respective theatres: (i) the War of the Third Coalition (1803–1806), (ii) the War of the Fourth Coalition (1806–1807), (iii) the War of the Fifth Coalition (1809), (iv) the War of the Sixth Coalition (1813–1814), (v) the War of the Seventh Coalition (1815), (vi) the Peninsular War (1807–1814), and (vii) the French invasion of Russia (1812). They were the most widespread and costly wars in European history before World War I. Upon realising the Coup of 18 Brumaire, whereby he became the First Consul of France in 1799, Napoleon assumed control of the politically chaotic French First Republic; subsequently, Napoleon created a financially stable French state with a strong bureaucracy and a professional army. The British fleet under Admiral Nelson decisively crushed the joint Franco-Spanish navy in the Battle of Trafalgar in October 1805. This victory secured British control of the seas and prevented the invasion of Britain. In December 1805, Napoleon defeated the allied Russo-Austrian army at Austerlitz. Concerned about increasing French power, Prussia led the creation of the Fourth Coalition with Russia, Saxony, and Sweden, which resumed war in October 1806. Napoleon quickly beat out the Prussians at Jena and the Russians at Friedland, bringing an uneasy peace to the continent. The treaty failed to end the battle conclusively, because war broke out in 1809, with the badly prepared Fifth Coalition, led by Austria. At first, the Austrians won a stunning victory at Aspern-Essling, but were quickly defeated at Wagram. Hoping to isolate and weaken Britain economically through his Continental System, Napoleon launched an invasion of Portugal, the only remaining British ally in continental Europe. After occupying Lisbon in November 1807, and with the bulk of French troops present in Spain, Napoleon seized the opportunity to turn against his former ally, depose the reigning Spanish royal family and declare his brother King of Spain in 1808 as José I. The