In 1866, Württemberg took up arms on behalf of Austria in the Austro-Prussian War, but three weeks after the Battle of Königgrätz on 3 July 1866, her troops suffered a comprehensive defeat at Tauberbischofsheim, and the country lay at the mercy of Prussia. The Prussians occupied the northern part of Württemberg and negotiated a peace in August 1866. By this, Württemberg paid an indemnity of 8,000,000 gulden, but she at once concluded a secret offensive and defensive treaty with her conqueror. Württemberg was a party to the Saint Petersburg Declaration of 1868.