These efforts were finally terminated by Austria's humiliating defeat in the 1866 Austro-Prussian War. After the Peace of Prague, the Prussian chancellor Otto von Bismarck, now at the helm of German politics, pursued the expulsion of Austria and managed to unite all German states except Austria under Prussian leadership, while the Habsburg lands were shaken by ethnic nationalist conflicts, only superficially resolved with the Austro-Hungarian Compromise of 1867.