With the death of Swedish King Charles X Gustav, the Swedish government begins to seek peace with Sweden's enemies in the Second Northern War, something that Charles had refused. As his son and successor on the throne, Charles XI, is only four years old, a regency rules Sweden until 1672.

The Second Northern War (165560), (also First or Little Northern War) was fought between Sweden and its adversaries the PolishLithuanian Commonwealth (165560), the Tsardom of Russia (165658), Brandenburg-Prussia (165760), the Habsburg monarchy (165760) and DenmarkNorway (165758 and 165860). The Dutch Republic waged an informal trade war against Sweden and seized the colony of New Sweden in 1655, but was not a recognized part of the PolishDanish alliance.

In 1655, Charles X Gustav of Sweden invaded and occupied western PolandLithuania, the eastern half of which was already occupied by Russia. The rapid Swedish advance became known in Poland as the Swedish Deluge. The Grand Duchy of Lithuania became a Swedish fief, the PolishLithuanian regular armies surrendered and the Polish king John II Casimir Vasa fled to the Habsburgs. Frederick William, Elector of Brandenburg and Duke of Prussia initially supported the estates in Royal Prussia, but allied with Sweden in return for receiving the Duchy of Prussia as a Swedish fief. Exploiting the hurt religious feelings of the Roman Catholic population under Protestant occupation and organizing PolishLithuanian military leaders in the Tyszowce Confederation, John II Casimir Vasa managed to regain ground in 1656. Russia took advantage of the Swedish setback, declared war on Sweden and pushed into Lithuania and Swedish Livonia.

Charles X Gustav then granted Frederick William full sovereignty in the Duchy of Prussia in return for military aid, and in the Treaty of Radnot allied himself with the Transylvanian George II Rkczi who invaded PolandLithuania from the southeast. John II Vasa found an ally in Leopold I of Habsburg, whose armies crossed into PolandLithuania from the southwest. This triggered Frederick III of Denmark's invasion of the Swedish mainland in early 1657, in an attempt to settle old scores from the Torstenson War while Sweden was busy elsewhere. Brandenburg left the alliance with Sweden when granted full sovereignty in the Duchy of Prussia by the Polish king in the treaties of Wehlau and Bromberg.

Frederick III's war on Sweden gave Charles X Gustav a reason to abandon the PolishLithuanian deadlock and fight Denmark instead. After marching his army to the west and making a dangerous crossing of the frozen straits in the winter of 1657/58, he surprised the unprepared Frederick III on the Danish isles and forced him into surrender. In the Treaty of Roskilde, Denmark had to abandon all Danish provinces in what is now Southern Sweden. The anti-Swedish allies meanwhile neutralized the Transylvanian army and Polish forces ravaged Swedish Pomerania.

In 1658 Charles X Gustav decided that instead of returning to the remaining Swedish strongholds in PolandLithuania, he would rather attack Denmark again. This time, Denmark withstood the attack and the anti-Swedish allies pursued Charles X Gustav to Jutland and Swedish Pomerania. Throughout 1659, Sweden was defending her strongholds in Denmark and on the southern Baltic shore, while little was gained by the allies and a peace was negotiated. When Charles X Gustav died in February 1660, his successor settled for the Treaty of Oliva with PolandLithuania, the Habsburgs and Brandenburg in April and the Treaty of Copenhagen with Denmark in May. Sweden was to keep most of her gains from Roskilde, the Duchy of Prussia became a sovereign state, and otherwise, the parties largely returned to the status quo ante bellum. Sweden had already concluded a truce with Russia in 1658, which gave way to a final settlement in the Treaty of Cardis in 1661.

Charles X Gustav, also Carl Gustav (Swedish: Karl X Gustav; 8 November 1622 – 13 February 1660), was King of Sweden from 1654 until his death. He was the son of John Casimir, Count Palatine of Zweibrücken-Kleeburg and Catherine of Sweden. After his father's death he also succeeded him as Pfalzgraf. He was married to Hedwig Eleonora of Holstein-Gottorp, who bore his son and successor, Charles XI. Charles X Gustav was the second Wittelsbach king of Sweden after the childless king Christopher of Bavaria (1441–1448) and he was the first king of the Swedish Caroline era, which had its peak during the end of the reign of his son, Charles XI. He led Sweden during the Second Northern War, enlarging the Swedish Empire. By his predecessor Christina, he was considered de facto Duke of Eyland (Öland) before ascending to the Swedish throne.

His numbering as Charles X derives from a 16th-century invention. The Swedish king Charles IX (1604–1611) chose his numeral after studying a fictitious history of Sweden. This king was the fourth actual King Charles, but has never been called Charles IV.