The history of the city is closely related to the history of its port. As early as the 9th century, a small harbour was mentioned in historical records.
In the year 1188, there were first harbour facilities at the Nikolaifleet. Hamburg’s rise to an important metropolis began when harbour rights were bestowed with a certificate from the Emperor Frederick I, the so-called Barbarossa-Freibrief.
By joining the union of merchants, and later of commercial towns, of the Hanseatic League in the 14th century, Hamburg’s development reached a first peak. Bourgeois houses, trade offices and warehouses shaped the face of the town.
In the 15th century, raids by pirates became a severe threat to trading. The buccaneers were chased and executed on the Grasbrook. Among the beheaded pirates, there was the legendary Klaus Störtebeker.
From 1522 on, the Reformation entered Hamburg. In 1529, the Reformation according to the Lutheran confession was introduced and since then, Hamburg has been an Evangelical Lutheran town.
A period of fierce competition began in 1664 when the neighbouring town Altona, which belonged to Denmark, received the town charter from the Danish King Frederick III.
The Continental System, imposed by Napoleon to ban any trade with the enemies of France, was a severe blow to the Free and Hanseatic City. Napoleon occupied Hamburg in 1806 in order to enforce the blockade. The city became part of the French Empire from 1811 to 1814.
The trade with the United States, which had become independent in 1776, made Hamburg a port of global importance in the early 19th century.
In the period of industrialisation, the city expanded considerably. The old harbour facilities were ultimately unable to deal with the growing flows of goods. Thus, new basins had to be built. In 1881, Hamburg joined the customs territory of the German Empire at the insistence of the Chancellor of the Empire Otto von Bismarck. Hamburg was only allowed to keep a small piece of foreign customs territory – the free port with the Speicherstadt. This warehouse district was built on oak piles from 1883 as a part of the free port.
In 1840, construction works of the St. Pauli piers began.
In 1909, the terminal building with a length of 205 m and the distinctive water level tower with its tower clock, water level indicator and watch bell were built.
Around the turn of the century, the Port of Hamburg became the third largest port of the world after London and New York.
The Second World War brought a major setback when not only 80 % of the harbour facilities were destroyed, but large parts of the city were laid in ashes.
This is the main reason why there are hardly any old buildings in many areas of the town.