In medieval times Sweden began exerting its influence in southwestern Finland and the signing of the Peace of Pähkinäsaari, an important peace treaty, with the rulers of Novgorod in 1323 established a border near St Petersburg that allowed for centuries of peaceful development along this coastline.
Extensive conflicts over the centuries with Russia and other Baltic powers led to various changes of the border zone and the fortification of many towns along the coast. Sweden lost part of the coast in the early 18th century, regained it again, only to lose the whole of Finland to Russia in 1809. Hanko became a popular place for the Russian aristocracy in summer, and the tsar fished at Kotka. Then came the Winter War and the Continuation War, which saw heavy fighting in the whole area.