The History of Szczecin () dates back to the 8th century. Throughout its history the city has been part of Poland, Denmark, Sweden and Germany. Since the Middle Ages, it is one of the largest and oldest cities in the historic region of Pomerania, and today, is it the largest city in northwestern Poland. Prehistory Tacitus located the East Germanic tribe of the Rugians in the area around Szczecin, as did modern historians. The Rugians left during the Great Migrations in the 5th century AD. Slavonic stronghold, medieval Poland (8th–12th century) Another stronghold was built in the 8th century-first half of the 9th century at the ford of the Oder River, (at the same location where later was a ducal castle) and a few craftsmen, fishermen and traders settled in the vicinity. Later it became the main centre of a Western Slavic tribe of Ukrani (Wkrzanie) living in the fork of the Oder between the main branch and the Randow River. Several Triglav temples existed nearby. Szczecin became part of the emerging Polish state under its first historic ruler Mieszko I of Poland in 967, part of which it remained for several decades. After the decline of Wolin in the 12th century, Stetinum became one of the most important and powerful cities of the Baltic Sea south coasts, having some 5,000 inhabitants. In a winter campaign of 1121–1122, the area was subjugated by Boleslaw III of Poland, who invited the Catholic bishop Otto of Bamberg to baptize the citizens (1124). Wartislaw I, Duke of Pomerania is recorded as the local duke during this time. Wartislaw managed to expand his duchy westward, thereby forming the territorial body of the later Duchy of Pomerania, and organized the second visit of Otto in 1128. At this time the first Christian church of St. Peter and Paul was erected. It remained under Polish suzerainty until the fragmentation of Poland following the death of Boleslaw III of Poland and afterwards remained the capital of the separate Duchy of Pomerania, still ruled by the local Slavic Griffin dynasty, of which Wartislaw I was the first historical ancestor, for the centuries to come, until its extincion in 1637. Szczecin did not lose its capital status even during the partitions of Pomerania and always was seat of Pomeranian dukes. From the late 12th century the city briefly fell under the overlordship of Saxony from 1164, Denmark from 1173,