Date of foundation of the city Visby is not known exactly and it is lost somewhere in the dark ages, but this place was inhabited in the 9th century AD as well because there were a fresh water sources and safe harbour. Name Visby has it's origin in Old Norse Vis - a holy place and By - the village. City was founded by gutas the indigenous population of the island, which gave to it its name.
9-11 century and especially during the Viking Age Gotland and Visby was the most important trading city on the Baltic Sea on the great trade route from Danish Hedebyu to Novgorod in Russia and far more to the East. No wonder at Gotland were found the richest treasures of Arab, Anglo-Saxon and German coins of that's time. Power in Visby owned local Council so called Ting.
In 1161 in Artlenburg Visby's representatives signed a treaty with the Saxon Duke Henry the Lion, who canceled he's trade monopoly in the German city of Luebeck, and therefor the Germans were allowed to trade in Visby. Since that time, the in the city began to appear more and more German merchants, which eventually gained considerable weight in the Visby city politics.
All of that caused some problems with indigenous population of the Gotland - the sailors, pilots, farmers, which subsequently resulted in a harsh confrontation, sometimes armed, and eventually burgers of Visby became anxious about own security.
City wall in Visby or ringmur was started in the early 13th century., in 1280 it was rebuilt, it's height was increased and new towers were built. In the 1288 conflict the city with it's Gotland's republic reached an extreme point and peasant militia of the republic together with a number of Danish mercenaries has tested new fortifications in an unsuccessful assault. The test was successful for the city, the wall was slightly remodeled and the beginning of the 14th century it acquired its present form with 3.5 km length and 29 towers (currently preserved 27 towers).
Swedish king Magnus Ladulos intervened in the conflict as a peacemaker and for he's support of Visby in the war signed with burgers "act of obedience" with some financial obligations. Visby defeated Gotland's country, but from that moment it began to lose its independence slowly.
Late 13th century Hansa city of Lübeck began to gain more and more weight in the trade in the Baltic Sea, in addition turnover with Russia significantly reduced because of the Mongol invasion. Trade paths are shifted to the south, to the Mediterranean, and in the meantime Visby wealth went downhill.
In July 1361 Danish King Waldemar IV Attertag landed with an army of 13 km. south of Visby. Swedish king Magnus Eriksson already gave him Blekinge, Skane and Halland and had no help for Gotland if he wanted to. Gotland peasant army which fought against the Danes, was defeated in three battles at the village Felemyur, at Aymund's bridge and under the walls of Visby itself. Burghers prefer to sit inside the city wall's ring and to pay contribution. Contribution was great and after that Visby finally ceased to be a key link in the Baltic trade routes.
In 1391, 1394 "Victual Brothers" - pirates and privateers attacked the island of Gotland and seized the island in 1394 and made it into a naval base of operations against the Danes. These desperadoes were at service of Albert of Mecklenburg against danes Queen Margaret during their war for Scandinavian supremacy. The war ended soon, but the Pirates did not enjoyed the peace and began to plunder all in around, Hanseatic merchants especially.
Hanseatic League expressed grave concern and hired forked Teutonic Order to solve the problem. Teutons equipped operational fleet and together with friendly Livonian Order in a few years have crushed all the pirate town on the Baltic Sea, including Visby in 1398. Until 1408 on Gotland was in possession of Teutons, but soon they sold it and all its contents to the Danish crown. About 1400 Teutons erected mighty Visborg castle to the south of Visby city.
In 1436 exiled Swedish King Erik of Pomerania invaded Gotland and settled in Vizborg castle and turning Visby and Gotland in own pirate nest for 13 years, doing the same-as "Victual Brothers" but may be a slightly smaller scale.
In 1448 by order of King Karl Knutsson Bond Swedes attacked Visby, captured him and local people had sworn to the Swedish crown, but the Danes recaptured the city and the island back in the year. Gotland became a disputed territory for almost 200 years. It was ruled by the Danish lansmans sometimes purely nominal, and local church belonged to the diocese of Lyunchoping in Sweden.
In 1524, King Gustav Vasa sent a fleet to the island of Gotland. Swedes had no problems with the countryside and the city of Visby, however Vizborg withstood and Swedes retreated to mainland.
In 1620 Danes organized in Visby Gotland's merchant company, whose activities on the island had to led near to open revolt. The company had to close.
In 1645 one more Danish-Swedish war ended with Bromsebru treat and Gotland departed to Sweden. danes seized the island again in 1675-1679 during war for Skone but after 1679 Gotland was finally incorporated in to Swedish kingdom. Before leaving malefic Danes destroyed the castle of Vizborg. Looks like peace had come to the Gotland soil...
In 1718-19 during the Great Northern War the island has experienced several devastating raids of Russian military command under the command Apraksin who landed on the island and burned coastal villages.
1808. The "Finland War" of Russia and Sweden begun. "To have island of Gotland for us appears to be as valuable as owning all the Finland" - so said the Russian Emperor Alexander I to Rear Admiral Nikolay Bodisko, the commander of Russian troops assigned to capture Gotland. April 22, 1808 the Russian fleet with masquerading Swedish flags entered to the harbor of Visby. There was no resistance, since almost all capable men fought in Finland. April 25 all the Gotland was incorporated into the Russian Empire for "once and for all".
"Once and for all" lasted only three weeks, and after that Swedish fleet with troops on board went into the harbor of Visby. Admiral Bodisko, having no more than two thousand Cossacks, soldiers and sailors with 6 guns decided to surrender the city and the island without a fight and avoid needless deaths and destructions. In Russia he was sent to court and spent three years in Vologda, in a exile, but was pardoned in 1811 and then ended his life as a commandant of Sveaborg fortress.
In the 19th century, before the invention of Swedish socialism, Sweden was a very poor country. Government in Stockholm to improve living conditions in Visby, but it's capabilities were limited and medieval Visby remained virtually untouched as a whole. In the second half of the 19th century in Europe (and in Sweden too) interest in antiquity began to arise and medieval Visby began to turn into a tourist center. Archaeological excavations on the island clearly showed the Swedes, what a treasure they possess.
In addition, modern Visby now an industrial center with a population of 25 thousand, it is a major trading port, a university town and by all means a notable resort destination.
It is believed that is the longest and best-preserved of the city's medieval walls in all the Europe. It has 3.5 km. length and has with 27 towers. For walls preserves in their original form and retained their height in it's most part. Excellent example of medieval city fortifications.
There was no redevelopment as in the medieval Vyborg under Catherine II, Visby cityscape was not broken with new buildings as in modern St. Petersburg, it's seems like nothing significant was built here before the 20th century. More than 2 hundred medieval houses remained in the town.
The town of Visby is strictly recommended to thoughtful and unhurried visit for enthusiasts of fortification and antiquities. You'll welcomed in any season, even right now ... Just do not forget the rubber galoshes to wear (kidding).