Trondheim (), historically Kaupangen, Nidaros and Trondhjem, is a city and municipality in Sør-Trøndelag county, Norway. It has a population of 187,353 (January 1, 2016), and is the third most populous municipality in Norway, although the fourth largest urban area. It is the third largest city in the country, with a population (2013) of 169,972 inhabitants within the city borders. The city functions as the administrative centre of Sør-Trøndelag county. Trondheim lies on the south shore of Trondheim Fjord at the mouth of the River Nidelva. The city is dominated by the Norwegian University of Science and Technology (NTNU), the Foundation for Scientific and Industrial Research (SINTEF), St. Olavs University Hospital and other technology-oriented institutions. 

The settlement was founded in 997 as a trading post, and it served as the capital of Norway during the Viking Age until 1217. From 1152 to 1537, the city was the seat of the Catholic Archdiocese of Nidaros; since then, it has remained the seat of the Lutheran Diocese of Nidaros and the Nidaros Cathedral. It was incorporated in 1838. The current municipality dates from 1964, when Trondheim merged with Byneset, Leinstrand, Strinda and Tiller. 

The city was originally given the name by Olav Tryggvason. It was for a long time called "Nidaros" (), or "Niðaróss" in the Old Norse spelling. But it was also just called "kaupangr" ("city") or, more specifically, "kaupangr í Þróndheimi" ("the city in the district Þróndheimr", i.e. Trøndelag). In the late Middle Ages people started to call the city just "Þróndheimr". In the Dano-Norwegian period, during the years as a provincial town in the united kingdoms of Denmark-Norway, the city name was spelled "Trondhjem".
WHen was it founded?
The settlement was founded in 997