The Kingdom of Saxony (Königreich Sachsen), lasting between 1806 and 1918, was an independent member of a number of historical confederacies in Napoleonic through post-Napoleonic Germany. From 1871 it was part of the German Empire. It became a Free state in the era of Weimar Republic in 1918 after the end of World War I and the abdication of King Frederick Augustus III of Saxony. Its capital was the city of Dresden, and its modern successor state is the Free State of Saxony.
Before 1806 Saxony was part of the Holy Roman Empire, a thousand-year-old entity which had once aspired to be a single state, but had become highly decentralised over the centuries. The rulers of Electorate of Saxony had held the title of elector for several centuries. When the Holy Roman Empire was dissolved following the defeat of Emperor Francis II by Napoleon at the Battle of Austerlitz, the electorate was raised to the status of an independent kingdom with the support of France, then the dominant power in Central Europe. The last elector of Saxony became King Frederick Augustus I.
Following the defeat of Saxony's ally Prussia at the Battle of Jena in 1806, Saxony joined the Confederation of the Rhine, and remained within the Confederation until its dissolution in 1813 with Napoleon's defeat at the Battle of Leipzig. Following the battle, in which Saxony - virtually alone of the German states - had fought alongside the French, King Frederick Augustus I was considered to have forfeited his throne by the allies, who put Saxony under Russian occupation and administration. This was probably more due to the Prussian desire to annex Saxony than to any crime on Frederick Augustus's part, and the fate of Saxony would prove to be one of the main issues at the Congress of Vienna. In the end, 40% of the Kingdom, including the historically significant Wittenberg, home of the Protestant Reformation, was annexed by Prussia, but Frederick Augustus was restored to the throne in the remainder of his kingdom, which still included the major cities of Dresden and Leipzig. The Kingdom also joined the German Confederation, the new organization of the German states to replace the Holy Roman Empire.
During the 1866 Austro-Prussian War, Saxony sided with Austria, and the Saxon army was generally seen as the only ally to bring substantial aid to the Austrian cause, having abandoned the defense of Saxony itself to join up with the Austrian army in Bohemia. This effectiveness probably allowed Saxony to escape the fate of other north German states which allied with Austria (notably the Kingdom of Hanover), which were annexed by Prussia after the war. The Austrians insisted as a point of honour that Saxony must be spared, and the Prussians acquiesced. Saxony nevertheless joined the Prussian-led North German Confederation the next year. With Prussia's victory over France in the Franco-Prussian War of 1871, the members of the Confederation were organised by Otto von Bismarck into the German Empire, with Wilhelm I as its Emperor. John I, as Saxony's incumbent king, was subordinate and owed allegiance to the Emperor, although he, like the other German princes, retained some of the prerogatives of a sovereign ruler, including the ability to enter into diplomatic relations with other states.