Hamburg, officially the Free and Hanseatic City of Hamburg, is the second-largest city in Germany after Berlin and 7th largest city in the European Union with a population of over 1.84 million. Hamburg's urban area has a population of around 2.5 million and its metropolitan area is home to more than five million people. The city lies on the River Elbe and two of its tributaries, the River Alster and the River Bille. One of Germany's 16 federated states, Hamburg is surrounded by Schleswig-Holstein to the north and Lower Saxony to the south.
The official name reflects Hamburg's history as a member of the medieval Hanseatic League and a free imperial city of the Holy Roman Empire. Before the 1871 Unification of Germany, it was a fully sovereign city state, and before 1919 formed a civic republic headed constitutionally by a class of hereditary grand burghers or Hanseaten. Beset by disasters such as the Great Fire of Hamburg, North Sea flood of 1962 and military conflicts including World War II bombing raids, the city has managed to recover and emerge wealthier after each catastrophe.
Hamburg is Europe's third largest port, after Rotterdam and Antwerp.