 However, the Cossacks did not retain the city and withdrew, satisfying themselves with a ransom.In 1655 the Swedish armies invaded Poland and soon took most of it.Eventually the Polish king Jan II Kazimierz solemnly pronounced his vow to consecrate the country to the protection of the Mother of God and proclaimed Her the Patron and Queen of the lands in his kingdom at Lwów Latin Cathedral in 1656 (Lwów Oath).