 In 1655, during fighting between Polish forces and the invading Swedish army in the Northern War, Shabbatai HaKohen fled Vilna with the entire Jewish community.After a short stay at Lublin he went to Prague and later to Strážnice in Moravia, from where he was called to the rabbinate of Holešov, where he remained until his death in 1662.While in Holešov, he gained the friendship of Magister Valentino Wiedreich of Leipzig.