Austria again fought against France during the Second and Third Coalitions, when after meeting a crushing defeat at Austerlitz, Holy Roman Emperor Francis II had to agree to the Treaty of Pressburg, weakening the Austrian Empire and reorganizing Germany under a Napoleonic imprint known as the Confederation of the Rhine.