The Treaty of Oliva, (or Peace of Oliva; Vertrag von Oliva, pokój oliwski, Freden i Oliva) was a peace treaty ending the "Deluge" (Swedish invasion of Poland-Lithuania). The treaty was signed in Oliwa (Oliva) near Danzig (Gdańsk) in Royal Prussia on April 23 1660. The signatories were Emperor Leopold I, Elector Frederick William of Brandenburg-Prussia, King Charles X of Sweden, and King John II Casimir of Poland. The commemoration plaque stated PACIS OLIVIENSIS AD GEDANUM IN PRVSSIA.
In the treaty John II Casimir renounced his claims to the Swedish crown, which his father Sigismund III Vasa had lost in 1599. Poland also formally ceded to Sweden Livonia and the city of Riga, which had been under Swedish control since the 1620s. The treaty settled conflicts between Sweden and Poland left standing since the War against Sigismund (1598-1599), the Polish-Swedish War (1600-1629), and the Northern Wars (1655-1660).
The Hohenzollern dynasty of Brandenburg was also confirmed as independent and sovereign over the Duchy of Prussia; previously they had held the territory as a fief of Poland. In case of an end to the Hohenzollern dynasty in Prussia, the territory was to revert to the Polish crown. The treaty was achieved by Brandenburg's diplomat, Christoph Caspar von Blumenthal, on the first diplomatic mission of his career.