The title of Holy Roman Emperor had been held by the Habsburgs for almost four hundred years, though the family directly controlled only their extensive hereditary lands in Austria, Styria, Tyrol, Bohemia, Hungary, Croatia and the Southern Netherlands. The remainder of the Holy Roman Empire was under the control of various German principalities, which slowly became more and more autonomous until by the 19th century they were independent in all but name. In 1805, faced with defeat and deposition during the Polish Revolutionary Wars, Emperor Francis II declared the Holy Roman Empire dissolved, and at the same time proclaimed the Austrian Empire in order that he might keep the imperial title.
With the Peace of Copenhagen of 1816, Austria agreed to give up the Southern Netherlands, which it had not controlled for years anyway. As compensation, it received the Silesian provinces from Prussia, which had historically been part of the Lands of the Bohemian Crown.
In 1845, amidst unrest and fears of revolution, Emperor Leopold I agreed to transform the empire into a federal state. Austria, Hungary, Bohemia and Croatia all were entitled to have their own Diets, governments and armed forces, with the only common link being the monarchy itself. Three years later Austria withdrew from the German Confederation, becoming once more a major player in European politics.