Holy Roman Empire
The empire was dissolved on 6 August 1806, when the last Holy Roman Emperor Francis II (from 1804, Emperor Francis I of Austria) abdicated, following a military defeat by the French under Napoleon at Austerlitz (see Treaty of Pressburg). Napoleon reorganized much of the Empire into the Confederation of the Rhine, a French satellite. Francis' House of Habsburg-Lorraine survived the demise of the empire, continuing to reign as Emperors of Austria and Kings of Hungary until the Habsburg empire's final dissolution in 1918 in the aftermath of World War I.
Kingdom of Saxony
Before 1806, Saxony was part of the Holy Roman Empire, a thousand-year-old entity that had become highly decentralised over the centuries. The rulers of the Electorate of Saxony of the House of Wettin had held the title of elector for several centuries. When the Holy Roman Empire was dissolved in August 1806 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 the First French Empire, then the dominant power in Central Europe. The last elector of Saxony became King Frederick Augustus I.