Hamburg, officially Freie und Hansestadt Hamburg, is the second largest city in Germany and the eighth largest city in the European Union. It is the second smallest German state by area. Its population is over 1.7 million people, and the Hamburg Metropolitan Region has more than 5 million inhabitants. The city is situated on the river Elbe.The official name reflects its history as a member of the medieval Hanseatic League, as a free imperial city of the Holy Roman Empire, a city-state, and one of the 16 states of Germany. Before the 1871 Unification of Germany, it was a fully sovereign state. Prior to the constitutional changes in 1919, the civic republic was ruled by a class of hereditary grand burghers or Hanseaten.