The Austrian Empire was formed on August 6th, 1806 when Holy Roman Emperor Francis II abandoned most of the German territories of the empire when Napoleon formed the Confederation of the Rhine. The Confederation was a group of German states that were allies of France and was formed when Napoleon defeated Francis II and the Russian Czar, Alexander I at the Battle of Austerlitz. After the winning the battle, Napoleon forced Francis to agree to the harsh terms of the Treaty of Pressburg, forming the Confederation of the Rhine. Not wanting Napoleon to succeed him as emperor, Francis abandoned these french-allied territories and simply kept control of the territories in eastern europe. Francis also transferred the captial to Vienna, Austria. Due to Austria's new importance in the empire, the Holy Roman Empire then became known asthe Austrian Empire. Later on, Austria would come to hate the very same German states they had once ruled, especially Prussia, by fighting them constantly in wars. They also fought against Italy a number of times in its history, even during the Unification of Italy as a whole state and also, during World War I. After Napoleon, the Austrian Empire became a major power in Europe and prospered quite well, economically. Then, in 1867, Austria made a union with the Kingdom of Hungary to "share" the lands with both states' monarchies, increasing the power of the new Austro-Hungarian Empire. The empire lasted 51 years until it bankrupted and dissolved after paying an extremely large fee at the Treaty of Versailles for the destruction they caused during World War I .