Third largest city of Norway, founded in 997 by King Olaf I Tryggvason as the village of Kaupangr. He built a church and a royal residence, Kongsgård, there and it became the great medieval capital of Norway. Located along the ice-free Trondheim Fjord, it commanded land and sea routes to Russia and the rest of Europe. The sagas describe it as a flourishing late Viking trade center with as many as three royal palaces, several churches, and a Thing-place where parliament assembled. Excavations have uncovered only part of the timber-built medieval town: the outlines of a 10th-century hall-type house, 11th-century church, and other smaller buildings.