Hamburg

Hamburg, also known as the Free Imperial City of Hamburg was a free city in the Holy Roman Empire until the empire was dissolved, when it became an fully independent and sovereign city state. Later Hamburg joined the German Confederation and remained a member until it too, was dissolved, after which Hamburg joined the North German Confederation and remained a member until integration into the German Empire in 1871.

Politics
Hamburg was a Free Imperial City under Lübeck Law (Oligarchical Republic).

The Lübeckian-style council was the Senate of Hamburg, which persists to this day. The senate operated under the exact principles of Lübeck law until 1860, when the members of the senate started being elected by members of the Parliament (Hamburgische Bürgerschaft), which was established in 1859.

The senate had up to 60 members, which is more then the usual 20 members predicted by Lübeck Law.

Mayors
See List of mayors in Hamburg

The senate elected up to four mayors (German: Bürgermeister) from its members, who shared the power of government.

The "first mayor" (German: Erster Bürgermeister), usually the eldest, acted as the de jure leader of the city, although he held the same power as the other four mayors.

Wars

 * Hamburg attacked the Duchy of Saxe-Lauenburg in 1393 to conquer the Ritzebüttel castle from the knights Lappe who had previously been the feudal lords ruling over the Land Hadeln exclave of Saxe-Lauenburg. The war was won by Hamburg, which then seized the city and forced the lords to leave the territory. The rest of the exclave then fell into the de facto control of Hamburg until the peasants revolted in 1456 and reestablished the de facto Peasants' republic of Land Hadeln as fully independent.
 * Hamburg went to informal war with the city of Harburg, which was formally part of the Duchy of Brunswick-Lüneburg, over the corpse of someone who had drowned in the Elbe river, because only the city owing the waters was allowed to bury the corpse, and exactly those waters were a high point of contention between the two cities. A full-on military conflict broke out when both parties claimed the corpse, and thus also the water, as their own.
 * Hamburg attacked the Duchy of Saxe-Lauenburg in the 1404-1420 Vierlande-Bergedorf War in in an alliance with Lübeck, to conquer the Bergedorf and Vierlande territories from Saxe-Lauenburg. In 1420 the Treaty of Perleberg was signed, establishing the Bergedorf Condominium in the Bergedorf, Vierlande, and Geesthacht territories which remain part of Hamburg to this day.