Trondheim is located on the estuary of the River Nidälven on the Atlantic coast, and has been among the most important Norwegian towns since the Middle Ages.
It is thought that Olaf Tryggvasson founded the town in 997, but even earlier there was a market-place and a place where the "thing" gathered on the outflow of the River Nidälven. Trondheim began to flourish after St Olaf was buried there in 1031. Soon, there were rumours about miracles at the King’s grave. The town became a well-known place of pilgrimage. Throughout the Middle Ages, a large number of people visited the town. In 1075, it became an Episcopal seat and since 1152 it is the arch-Episcopal seat of Norway.
The Nidaros Cathedral in Trondheim is one of the great medieval cathedrals of northern Europe. Beside it is the Bishop’s palace, dating from the 12th century. Other medieval buildings in Trondheim were ruined by a number of fires.
During the Middle Ages, Trondheim exported fish and imported salt and luxury items. Trondheim lost its role as one of the most important towns during the late Middle Ages. Norway was then ruled by Denmark. At the same time, the Hanseatic League took control over the trade. Trade in western Norway was concentrated to Bergen. During the 16th century, when the reformation took place in Norway, the town lost its importance as a much-visited place of pilgrimage.
In the 17th century, Trondheim once again became an important commercial port, mainly exporting fish and wood.