Prussian troops drove into Austrian-held Holstein and took control of the entire state of Schleswig-Holstein. Austria declared war on Prussia and, after fighting the Austro-Prussian War (Seven Weeks' War), was swiftly defeated. The Treaty of Prague (1866) formally dissolved the German Confederation and Prussia created the North German Confederation to include all German states except the pro-French, southern kingdoms of Bavaria, Baden and Württemberg.