This article includes a list of references, but its sources remain unclear because it has insufficient inline citations. (April 2011) (Learn how and when to remove this template message)
The Treaty or Peace of Oliva of 23 April (OS)/3 May (NS) 1660 (Polish: Pokój Oliwski, Swedish: Freden i Oliva, German: Vertrag von Oliva) was one of the peace treaties ending the Second Northern War (1655-1660).The Treaty of Oliva, the Treaty of Copenhagen the same year and the Treaty of Cardis following year marked the high point of the Swedish Empire.
At Oliva (Oliwa, Royal Prussia), peace was made between Sweden, the Polish-Lithuanian Commonwealth, the Habsburgs and Brandenburg-Prussia. Sweden was accepted as sovereign in Swedish Livonia, Brandenburg was accepted as sovereign in Ducal Prussia, and John II Casimir Vasa withdrew his claims to the Swedish throne, though he was to retain the title of a hereditary Swedish king for life. All occupied territories were restored to their pre-war sovereigns. Catholics in Livonia and Prussia were granted religious freedom.
The signatories were the Habsburg Holy Roman Emperor Leopold I, Elector Frederick William I of Brandenburg and King John II Casimir Vasa of Poland. Magnus Gabriel de la Gardie, head of the Swedish delegation and the minor regency, signed on behalf of his nephew, King Charles XI of Sweden, who was still a minor at the time.
During the Second Northern War, Poland-Lithuania and Sweden had been engaged in a ravaging war since 1655 and both wanted peace, in order to attend to their remaining enemies, Russia and Denmark respectively. In addition, the politically ambitious Polish queen Marie Louise Gonzaga, who had great influence over both the Polish king and Polish parliament (the Sejm), wanted a peace with Sweden because she wanted a son of her close relative, the French Louis II de Bourbon, Prince de Condé, to be elected as successor to the Polish throne. This could only be achieved with the consent of France and its ally Sweden.
On the other hand, the Danish and Dutch envoys, as well as those of the Holy Roman Empire and Brandenburg, did what they could to derail the proceedings. Their goal was assisted by the drawn-out formalities which always took place at negotiations of this age. Several months elapsed before the actual peace negotiations could begin, on 7 January 1660 (old style). Even then, so many hostile words were written in the documents being exchanged by the two parties that the head negotiator, French ambassador Antoine de Lombres, found himself having to expurgate long sections which otherwise would have caused offense.
A Polish contingent headed by the archbishop of Gniezno wanted the war to continue in order to expel the exhausted Swedish forces in Livonia. The Danish delegates demanded of Poland conclude a treaty together with Denmark; the Poles did however not want to tie themselves to the outcome of the poor Danish fortunes of war against Sweden. Austria, which wished to drive Sweden out of Germany through continued warfare, promised Poland reinforcements, but Austrian intentions were treated with suspicion and the Polish Senate demurred. Even Frederick William, Elector of Brandenburg offered assistance to Poland to continue the war, with the hope of conquering Swedish Pomerania. 
France, which in practice was governed by Cardinal Mazarin, wanted a continued Swedish presence in Germany to counterbalance Austria and Spain, which were traditional enemies of France. France also feared that a continued war would increase Austria's influence in Germany and Poland. The Austrian and Brandenburgian intrusion into Swedish Pomerania was considered a breach of the Peace of Westphalia, which France was under the obligation to prosecute. France therefore threatened to contribute an army of 30,000 soldiers to the Swedish cause unless a treaty between Sweden and Brandenburg was concluded before February 1660.
Negotiations had begun in Toru? (Thorn) in autumn of 1659; the Polish delegation later moved to Gdansk while the Swedish delegation made the Baltic town of Sopot (Zoppot) its base. When news of the death of king Charles X of Sweden arrived Poland, Austria, and Brandenburg began increasing their demands. But a new French threat of assistance to Sweden finally made the Polish side give in. The treaty was signed in the monastery of Oliwa on 23 April 1660.
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.