The largest city in Denmark, Hamburg, or Hambørg, is the second largest port in Europe and a trading powerhouse.
Founded by Charlemagne in 808, who ordered a castle built to defend the Elbe River from Slavic incursions, the city was soon attached to Bremen and became a hub for the conversion missions to Scandinavia and beyond. Its history as a trading power was secured by its confirmation as an Imperial Free City by Emperor Frederick I in 1189.
Growing rich on trade it was repeatedly targeted, being alternately razed or occupied by Poland, Denmark or its own disgruntled citizens. A nascent trading league proposed with Lubeck was snuffed out by the early outbreaks of the Great Pox (which severely prejudiced many states against foreign traders) whilst 60% of its population was killed by the Black Death. It did however pioneer various laws that would spread across Germany in the coming centuries.
Converting to Lutheranism early during the Reformation it proved a staunch combatant during the 1st and 2nd Schmalkaldic Wars which earned it a Electorate under the Lutheran Schmalkaldic Empire. Close association with Denmark continued into the Fifty Years War and after the Danish conquest of still Catholic Bremen in 1627 it was effectively allowed to run it as a fief of the Empire. However debts and mismanagement made it unpopular and during the 1649 year of revolts Denmark took direct control of Bremen, adding it to its Oldenburg lands. Direct rule on Hamburg was enforced 1662 when it looked like the Imperial army was threatening the Elbe. Slightly dishonestly Hamburg would therefore be confirmed as Danish property at the Treaty of Copenhagen in 1668. It would briefly assert its independence during the Danish Civil War (1728-1731) but blockaded by the Danish fleet it surrendered.
It was however made capital of the newly created 'Kingdom of Lower Saxony' and the Riksdag moved from Bremen to sit in Hamburg. This arrangement continued until the Treaty of Rae which centralized Danish government. The local government of the County of Cuxhaven still convenes in Hamburg however.
Under Danish rule the port facilities were much extended and it has the largest industrial output of any Danish city. However it has suffered in rivalry with Copenhagen and much of its natural leadership in banking and finance has either gone to the capital or to Brunswick. The presence of the docks and industry has given it the feel of a cosmopolitan city as Germans from the Empire mix with Scandinavians from the North fed a population explosion in the 19th and 20th centuries
In 1936 the last major cholera outbreak in Europe occurred in the city killing almost 10,000 and leading to the fall of the national government, whilst a flood in 1962 caused massive damage to much of the inner city.