Trondheim (info • help) is a city and municipality in the county of Sør-Trøndelag, Norway. With 161,730 inhabitants inhabitant (as of 2006), Trondheim is Norway's third largest municipality, as well as the centre of the fourth largest urban area, with a population of about 152,800. As of 2006, the Trondheim Region, a statistical metropolitan area, has a population of 246,751.
The city of Trondheim was founded in 997. It was frequently used as the seat of the king, and was capital of Norway until 1217. In the Middle Ages, Trondheim was the site of several battles, including the battle between King Sverre and Erling Skakke, in 1179. The city has experienced several major fires - the most devastating in 1651 and 1681. The 1651 fire destroyed 90% of the buildings in Trondheim, and the 1681 fire led to a total reconstruction of the city.