The existence of the town was first documented in 1124, when it was part of the Duchy of Pomerania, which had been conquered by the Polish duke Bolesław III Wrymouth. It was then visited by Otto of Bamberg,[3] who was entrusted by Bolesław III Wrymouth with the Christianization of Western Pomerania.[4] The name of the town derives from Old-Polabian from the word *gardec < *gordьcь, meaning "small fortified settlement". Following the fragmentation of Poland in 1138 it was part of the separate Duchy of Pomerania, which in 1227 fell under the overlordship of the multi-ethnic Holy Roman Empire. In 1236, the castle was the seat of the local Slavic castellan.[5] In 1249 Gartz was granted town privileges by DukeBarnim I the Good. Because of its strategic location on the river, the town was frequently vulnerable during military campaigns. In 1284, it was one of the Pomeranian towns that guaranteed a peace treaty between the Duchy of Pomerania and the Margraviate of Brandenburg.[6] It was granted several privileges by Pomeranian dukes in the following decades.[7] During a Pomeranian succession war, in 1468, the town opened its gates to Brandenburgians, what was taken in other Pomeranian cities and towns as an act of treason.[8] In 1473, the Duchy of Pomerania made an unsuccessful attempt to recapture the town, however in 1477, with the help of the cities of Stargard and Szczecin, Gartz was finally recaptured, which was confirmed in a subsequent peace treaty.[8] In 1502, Bogislaw X, Duke of Pomerania temporarily resided in the town.[8]