Bergen is among the oldest towns in the Nordic countries. Perhaps it was founded during the reign of King Olaf Kyrre III (1067-1093), with the Royal Manor of Holmen as its centre. Soon after its foundation, Bergen became an Episcopal seat. The preserved Mary Church is from the 12th century, the cathedral is from the 13th century.
The town was a royal administrative centre throughout the Middle Ages. It was also an important commercial centre where dried fish was exported, the "Bergen cod". The merchants imported grain, cloth and wine. From the 14th century and onwards, the Hanseatic League dominated all trade in Bergen. German merchants came to live in the town. Around 1500, the Norwegian merchants started to take control of the trade themselves. The Hanseatic merchants were forced to move to the outer parts of the so-called "Bryggen", a harbour area with storehouses and shipbuilder ´s yards, which remains to this day.
Bergen was one of the most important commercial ports on the Northern Atlantic Sea during the Middle Ages. Among other things, the Icelandic trade was controlled from there. The town has succeeded in keeping its position as an important port.