in grains, salt and herrings, receiving various trading privileges from their dukes (known as emporium rights). It was granted special rights and trading posts in Denmark, and belonged to the Hanseatic trading cities union. In 1390 trade privileges were granted to Stettin by the Polish king Władysław II Jagiełło who established new trade routes from Poland to the Pomeranian ports. In the 14th and 15th centuries, Stettin conducted several trade wars with the neighboring cities of Gartz, Greifenberg (Gryfino) and Stargard over a monopoly on grains export. The grain supplying area was not only Pomerania but also Brandenburg and Greater Poland – trade routes along the Oder and Warta rivers. The 16th century saw the decline of the city's trading position because of the competition of the nobility, as well as church institutions in the grains exports, a customs war with Frankfurt (Oder), and the fall of the herring market. Social and religious riots marked the introduction of the Protestant Reformation in 1534. Around 1532 minting of coins in the city was halted, to be resumed in 1580 under duke John Frederick. Then were minted the first thalers of the Duchy of Pomerania. In 1570, the Northern Seven Years' War between Denmark and Sweden was ended in the city by the Treaty of Stettin (1570). From 1606 to 1618 the city was the residence of Duke Philip II, the greatest patron of the arts among all Pomeranian dukes. He founded a rich collection of ancient and early modern coins at the Ducal Castle. In 1625 the city became again capital of the reunited Duchy of Pomerania under Boguslaw XIV. By the 1630s the city and surrounding area that hadn't been already German had become completely Germanized. Under Swedish rule (1630–1720) During the Thirty Years' War, Stettin refused to accept German imperial armies, instead the Pomeranian dukes allied with Sweden. After the Treaty of Stettin (1630) manifested Swedish occupation, Stettin was fortified by the Swedish Empire. After the death of the last Pomeranian duke, Boguslaw XIV, Stettin was awarded to Sweden with the western part of the duchy in the Peace of Westphalia (1648), but remained part of the Holy Roman Empire. The Swedish-Brandenburgian border was settled in the Treaty of Stettin (1653). The King of Sweden became Duke of Pomerania and as such held a seat in the Imperial Diet of the Holy Roman Empire. The city was cut off