The Peace of Oliva ended the Northern War of 1655-60. It was signed by Sweden, Austria, Brandenburg and the Commonwealth of Poland-Lithuania. The main beneficiary of the treaty was Frederick William of Brandenburg. His sovereignty over Ducal Prussia, gained in the treaties of Wehlau and Bromberg (1657) was confirmed.
Sweden retained her possessions in the Empire, won during the Thirty Years War. Her possession of Livonia was officially recognised by Poland-Lithuania. John Casimir, king of Poland-Lithuania surrendered his family’s claim to the Swedish throne, inherited from his father Sigismund III. In return he was allowed to keep the title hereditary king of Sweden for life.
Other than the sovereignty of Prussia, the peace of Oliva essentially restored the pre-war situation. Sweden had failed to hang on to any of her conquests won in 1655, but was perhaps lucky to retain all of the areas she had held before the fighting began. The main reason for this was the on-going war between Poland-Lithuania and Muscovy (Thirteen Years War), which had distracted the Poles in the last years of the Northern War, preventing them from taking advantage of Sweden’s problems.