The Truce of Altmark ended the Polish-Swedish War of 1600-1629. That war had seen Sweden occupy Livonia and much of Prussia, and win a series of victories over Polish armies under Gustav Adolf. The last battle had been a Polish-Lithuanian victory at Honigfelde (27 June 1629), but neither side was in a position to win the war. Sigismund III of Poland-Lithuania was also under a great deal of pressure to make peace. The war was unpopular in Poland where many believed it could have been ended much earlier if Sigismund had been willing to abandon his claim to the throne of Sweden, lost to him in 1599.
The Truce of Altmark saw Sweden given possession of Livonia north of the Dvina river. Sweden was to receive part of the toll charged on the Danzig trade, as well as retaining Elbing. Brandenburg received possession of the ports of Marienburg and Danziger Haupt and the Grosse Werder, which would be returned to Sweden if no permanent peace treaty was agreed at the end of the six year truce. In return George William of Brandenburg allowed Sweden to occupy Pillau, Fischhausen, Lochstädt and Memel as a pledge of good faith on his part.
The agreement made at Altmark lasted until 1635, when it was replaced by the Truce of Stuhmsdorf. In that time Gustav Adolf had made his dramatic intervention in the Thirty Years War, but had died in 1632. The new terms agreed in 1635 were not so advantageous to Sweden.