After the Prussian defeat in the 1806/07 War of the Fourth Coalition, Goslar fell to the Kingdom of Westphalia until it was retaken in 1813 by Prussia. During the Congress of Vienna Goslar was a pawn between the Kingdom of Hanover and Prussia, but after some interplay went to Hanover. At the time Goslar was an impoverished provincial town with a small garrison of riflemen ("Jäger").