During the Swedish invasion he played an important role politically and militarily. In 1655, he accepted the Kiejdany act of recognition signed between usurper King Charles X Gustav of Sweden and Prince Janusz Radziwiłł, but soon came against this act taking action which aim was to help the Russian side. Despite being under surveillance, he managed to make contact with the Russian diplomat Vasily Likharov. Trapped by Janusz Radziwiłł he was catch in Kiejdany, where, as state prisoner was then transferred to &lt;a href="Kaliningrad"&gt;Królewiec/Königsberg&lt;/a&gt;.