 In 1409, Grand Master Ulrich von Jungingen of the Teutonic Knights guaranteed peace with the Kalmar Union of Scandinavia by selling the island of Gotland to Queen Margaret of Denmark, Norway and Sweden.In 1411, the Norwegian, Danish and Swedish King Eric of Pomerania had the castle of Visborg constructed, and settled himself there for twelve years, during which the city virtually became a pirates' nest, and the commerce halted.As of 1470, the Hanseatic League rescinded Visby's status as a Hanseatic town.