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.
Östersund
In 1758, the plans were brought back up through an initiative from the chief financial officer Pehr Schissler and the proposition did however initiate a new debate whether or not a city was to be established in Jämtland, in order to counteract the trading and "faring traditions" of Jämtland's farmers. Several other attempts at constraition had previously been taken, and deemed unsatisfactory. Östersund was founded and given its charter by Monarch Gustav III of Sweden on 23 October 1786, shortly after the outskirt of the Odensala farmers' lands were bought for the purpose. Several other places had been suggested, like Huså the then-largest settlement in Jämtland along with Krokom, Sunne and Ede outside of Brunflo. Frösön was also a candidate but the lot fell on Östersund, as it was deemed most favourable. The only thing actually located in the area at the time was the main road and the bridge to Frösön. Östersund was upon foundation freed from taxes during a 20-year timespan and completely liberated from trade regulations and guild order. In other remote locations of the Nordic region, similar cities were founded, like Reykjavík in Iceland the very same year, Tromsø (1794) in Northern Norway and Tampere (1775) and Kuopio (1782) in the Finnish inland. Östersund is however the only city in present-day Sweden to have been founded in the 18th century.