Right-bank Ukraine
In 1685 Paliy moved to Right-bank Ukraine and joined the service of Polish–Lithuanian Commonwealth king Jan Sobieski. During his years in Polish service, Paliy proved himself as an able Cossack commander in wars against Crimean Tatars and Ottoman Turks. Among other military deeds his men successfully raided the Turkish fortress of Ochakov and participated in the Battle of Vienna. He became the ataman of Right-bank Ukraine, still under Polish control (where the left-bank was under Russian control).