The martial King Charles X was appointed commander of Swedish forces in the Thirty Years’ War, just months before the Treaty of Westphalia (1648) was agreed, snuffing out his hopes of glory. He ascended the Swedish throne in 1654, impatient for conquest, and soon declared war on the Polish/Lithuanian commonwealth, thus initiating the Second Northern War (1655–60). His invasion of Poland met with military success, twice taking Warsaw, but when Brandenburg-Prussia entered the war, he was forced to buy their support, by recognizing their sovereignty of East Prussia. Russia meanwhile invaded Swedish Ingria in the Russo-Swedish War (1656–58). Baulked in Poland, Charles invaded Denmark over the frozen Baltic. Initial success was once more reversed, as the Danish alliance fought back, forcing Charles to negotiate. In the subsequent round of treaties, Charles managed to gain Scania (but returning Bornholm and Trondheim to Denmark), Livonia, and regained his lost territories from Russia, before dying suddenly of pneumonia.