During "the Deluge", when the Swedish armies invaded Polish–Lithuanian Commonwealth, which was already struggling with Muscovy, the Voivode of Poznań, Krzysztof Opaliński, surrendered Greater Poland to Swedish king Charles Gustav. Other areas also surrendered in rapid succession. Almost the whole country followed suit, with the Swedes entering Warsaw unopposed in August 1655 and John Casimir fleeing to Silesia, where he took refuge in the town of Oberglogau staying there in a local castle from October 17, 1655 until December 18 of the same year. However several places still resisted, most remarkably the monastery at Jasna Góra. The defense of Jasna Góra galvanized Polish resistance against the Swedes, as aggression on that place, perceived by Catholic Poles as the most holy sanctuary, rose massive anti-Swedish sentiments. In December 1655 the Tyszowce Confederation formed in support of the exiled John Casimir. Spontaneous uprisings started all over the country, attacking the dispersed occupation forces — who, in their turn, retaliated. The uprisings soon merged under the leadership of Polish military leaders Stefan Czarniecki and Grand Hetman of LithuaniaPaweł Jan Sapieha, who started organized counterattacks in order to eliminate those loyal to Charles Gustav. Considering these facts, John II Casimir decided to return. Trying to pass Swedish troops unexposed, he rode with only small host, from Silesia through Carpathian Mountains, finally reaching Lwów in March 1656.
The Lwów Oath
As almost the whole country was occupied by the Swedish or Russian armies, the reason behind the vow was to incite the whole nation, including peasantry in the first place, to rise up against the invaders. Thus two main issues raised by the king in the vows were primarily - a necessity to protect the Catholic faith, seen as endangered by the Lutheran aggressors, secondly - to manifest the will to improve the peasantry's condition. On 1 April 1656, during a holy mass in Lwów's Cathedral, conducted by the papal legatePietro Vidoni, John Casimir in a grandiose and elaborate ceremony entrusted the Commonwealth under the Blessed Virgin Mary's protection, whom he announced as The Queen of the Polish Crown and other of his countries. He also swore to protect the Kingdom's folk from any impositions and unjust bondage. Today, the Blessed Virgin Mary is known as the Queen of Poland. After the King, similar vow was taken by the Deputy Chancellor of the Crown and the bishop of KrakówAndrzej Trzebicki in the name of the szlachta noblemen of the Commonwealth. The Commonwealth forces finally drove back the Swedes in 1657 and the Russians in 1661. After the war, promises made by John Casimir in Lwów, especially those considering peasants' lot, were not fulfilled, mostly because of Sejm's objection, which represented the szlachta nobility, not attracted to the idea of reducing serfdom, which would negatively affect their economical interests.