Emperor
The first Austrian Emperor was the last Holy Roman Emperor Francis II. In the face of aggressions by Napoleon, Francis feared for the future of the Holy Roman Empire. He wished to maintain his and his family's Imperial status in the event that the Holy Roman Empire should be dissolved, as it indeed was in 1806 when an Austrian-led army suffered a humiliating defeat at the Battle of Austerlitz. After which, the victorious Napoleon proceeded to dismantle the old "Reich" by severing a good portion from the empire and turning it into a separate Confederation of the Rhine. With the size of his imperial realm significantly reduced, Francis II, "Holy Roman Emperor" became Francis I, "Emperor of Austria". The new imperial title may have sounded less prestigious than the old one, but Francis' dynasty continued to rule from Austria and a Habsburg monarch was still an emperor ("Kaiser"), and not just merely a king ("König"), in name.
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.