 In 1811, Napoleon invaded Bremen and integrated it as the capital of the (Department of the Mouths of the Weser) into the French State.In 1813, the French – as they retreated – withdrew from Bremen.Johann Smidt, Bremen's representative at the Congress of Vienna, was successful in achieving the non-mediatisation of Bremen, Hamburg and Lübeck, by which they were not incorporated into neighbouring monarchies, but became sovereign republics.