Hamburg is a city and the largest inland port in Europe. It is located on the Elbe in Germany.
The city of Hamburg owes its foundation to the emperor Charlemagne, who between 808 and 811 built a citadel and a church on the heights between the Elbe and the eastern bank of the Alster, as a bulwark against the neighbouring pagans. It became important as a commercial city in the 12th century, and in the 13th it combined with Lubeck in forming the Hanseatic League. In 1618 Hamburg was formally acknowledged a free city of the empire. During the Thirty Years' War its population and prosperity continued to increase on account of the immunity of its position, and in the following century it obtained a large share of the trade with North America. In 1810 it was formally incorporated in the French empire along with the north-western part of Germany In 1815 it joined the Germanic Confederation as a free city. In 1888 the city was included in the Zollverein or German Customs Union.