Gartz is a town in the Uckermark district in Brandenburg, Germany. It is located on the West bank of the Oder River, on the border with Poland, about 20 km south of Szczecin, Poland. It is located within the historic region of Western Pomerania. 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, who was entrusted by Bolesław III Wrymouth with the Christianization of Western Pomerania. 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. In 1249 Gartz was granted town privileges by Duke Barnim 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. It was granted several privileges by Pomeranian dukes in the following decades. 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. 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. In 1502, Bogislaw X, Duke of Pomerania temporarily resided in the town. The town was devastated in the Thirty Years' War, the Polish–Swedish War and the Great Northern War in the 17th–18th century. From 1648 to 1720 it was part of Swedish Pomerania, in 1720 it was annexed by Prussia, and from 1871 it formed part of the German Empire.