Prehistory and origin of Stockholm
According to the Chronicle of Eric, written in the 1320s, Stockholm was founded by Birger Jarl around 1250 as a lock to the Lake Mälaren region ("laas fore then sio", "lock before that lake") in order to prevent pirates from reaching the seven cities and nineteen parishes around it. Another medieval source ("Visbyannalerna"), however, claims the city was founded in 1187 following a pagan pillaged the city of Sigtuna, and as there was an "Earl" named Birger around at that time too, the disputed origin of the city are likely to remain obscure and some historians choose a diplomatic interpretation saying there was some sort of fortification around by the mouth of lake Mälaren when the city was founded during the second half of the 13th century. As Snorri mentions no city in his account but some sort of fortification called a "kastali" (in various manuscripts curiously said to be located east and west of "Stocksund"), it has generally been assumed this fortification eventually developed into the castle Tre Kronor located where still is the Stockholm Palace.
Stockholm
Research and higher education in the sciences started in Stockholm in the 18th century, with education in medicine and various research institutions such as the Stockholm Observatory. The medical education was eventually formalized in 1811 as Karolinska Institutet. The Royal Institute of Technology ("Kungliga Tekniska högskolan", or "KTH") was founded in 1827 and is currently Scandinavia's largest higher education institute of technology with 13,000 students. Stockholm University, founded in 1878 with university status granted in 1960, has 52,000 students . It also incorporates many historical institutions, such as the Observatory, the Swedish Museum of Natural History, and the botanical garden "Bergianska trädgården". The Stockholm School of Economics, founded in 1909, is one of the few private institutions of higher education in Sweden.