adjusted further Russia's previous (Truce of Andrusovo) territorial gains, and granted Russia the right to intervene in the Commonwealth to protect the interests of its Eastern Orthodox population. Russia's negotiated obligations fell short of a full anti-Ottoman involvement. In 1686 Russia joined the Holy League. The decisive reckoning with the Ottoman Empire was supposed to have taken place in 1686, through a coordinated attack of the Holy League allies on the various Ottoman provinces. The coordination turned out to be poor and the large force gathered by John III for a Danube offensive conducted no significant military operations. This and another failed expedition into Moldavia in 1691 mark the twilight of the Commonwealth's military might. For the rest of his life the ailing king hesitated between a pro-Habsburg and pro-French policy. His son Jakub Ludwik Sobieski married Hedwig of Neuburg, sister of the Empress. Queen Marie Casimire, promoting an alliance with France, signed herself in 1692 a treaty with Louis XIV, but was unable to persuade her husband, who felt bound by the Holy League loyalties, to do likewise. After Sobieski's death, King Augustus II the Strong attempted another anti-Ottoman Commonwealth campaign, during which only the Battle of Podhajce (1698) was fought. The final Treaty of Karlowitz concluded in 1699 the Holy League's wars with the Ottoman Empire. The Commonwealth ended up recovering Podolia with Kamieniec Podolski and the Bratslav region. The Austrian Habsburg Monarchy, expanded by Hungary and Transylvania, had become the leading Central European power. After the turn of the century, in Polish Ukraine there was no Ruthenian nobility left (the few survivors of the many wars sought refuge on the left-bank of the Dnieper River) and the right-bank Cossack Hetmanate no longer existed. During the 18th century thousands of Polish szlachta families and hundreds of thousands of Polish peasants arrived and resettled the devastated and depopulated Ukrainian lands. The left-bank Hetmanate fought under Ivan Mazepa, but was ruthlessly pacified by the Russians and eventually destroyed. The wars fought by the Commonwealth during the second half of the 17th century fulfilled their main role of protecting as much as possible of the eastern possessions, where latifundia of the magnates were for the most part located. More comprehensive foreign policy needs were neglected, the functioning of the state had become even more disorganized and the military effort and destruction contributed to further disintegration of the economy. Magnate oligarchies, decline