Hamburg
The traffic on the Elbe drew pirates. From 1390 former Victual Brothers preyed on Hamburg ships in the North Sea, until Hamburg and Lübeck fitted out warships against them in 1400 and in 1401 captured their two main fleets one after the other. While Lübeck was torn by unrest, leadership of the Hanse passed to Hamburg from 1410 to 1416, and in 1410 the council, pressed by its own burghers, set down their rights in a written settlement that is counted as the city's first constitution.
As the Hanse weakened, Hamburg opened its gates to newcomers. The Reformation arrived in 1529 with a church order drawn up by Luther's colleague Johannes Bugenhagen, and from 1567 Dutch Protestants fleeing Spanish persecution, English cloth merchants and later Portuguese Jews settled in the city, which opened one of the first exchanges in Germany in 1558 and founded the Hamburg Bank in 1619. Between 1616 and 1625 Dutch engineers ringed it with massive ramparts, and behind them Hamburg came through the Thirty Years' War unharmed.