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.
Storkyrkan
Storkyrkan was first mentioned in a written source dated 1279 and according to tradition was originally built by Birger Jarl, the founder of the city itself. For nearly four hundred years it was the only parish church in the city, the other churches of comparable antiquity originally being built to serve the spiritual needs of religious communities (e.g., Riddarholm Church). It became a Lutheran Protestant church in 1527. The parish church since the Middle Ages of the Nikolai parish, covering the whole island on which the Old Town stands, it has also been the cathedral of Stockholm since the Diocese of Stockholm was created out of the Archdiocese of Uppsala and the Diocese of Strängnäs in 1942. Because of its convenient size and its proximity to the earlier royal castle and the present royal palace it has frequently been the site of major events in Swedish history, such as coronations, royal wedding and royal funerals. The last Swedish king to be crowned here was Oscar II in 1873. Crown Princess Victoria, oldest daughter of King Carl XVI Gustaf and Queen Silvia, was married to Daniel Westling on 19 June 2010 at the Storkyrkan, the anniversary of her parents' marriage in Storkyrkan in 1976.