privileges had already been reduced by the Treaty of Drohiczyn in 1581. Polish gradually replaced German as the administrative language and the establishment of voivodeships reduced the Baltic German administration. The local clergy and the Jesuits in Livonia embraced the counter-reformation in a process assisted by Batory, who gave the Roman Catholic Church revenues and estates confiscated from Protestants as well as initiating a largely unsuccessful recruitment campaign for Catholic colonists. Despite these measures, the Livonian population did not convert en masse, while the Livonian estates in Poland–Lithuania were alienated. In 1590, the Russo-Swedish truce of Plussa expired and fighting resumed while the ensuing Russo-Swedish War of 1590–5 ended with the Treaty of Teusina (Tyavzino, Tyavzin), under which Sweden had to cede Ingria and Kexholm to Russia. The Swedish–Polish alliance began to crumble when the Polish King and Grand Duke of Lithuania Sigismund III, who as son of John III of Sweden (died 1592) and Catherine Jagellonica, was the successor to the Swedish throne, met with resistance from a faction led by his uncle, Charles of Södermanland (later Charles IX), who claimed regency in Sweden for himself. Sweden descended into a civil war in 1597, followed by the 1598–1599 war against Sigismund, which ended with the deposition of Sigismund by the Swedish riksdag. Local nobles turned to Charles for protection in 1600 when the conflict spread to Livonia, where Sigismund had tried to incorporate Swedish Estonia into the Duchy of Livonia. Charles then expelled the Polish forces from Estonia and invaded the Livonian duchy, starting a series of Polish–Swedish wars. At the same time, Russia was embroiled in civil war over the vacant Russian throne ("Time of Troubles") when none of the many claimants had prevailed. This conflict became intertwined with the Livonian campaigns when Swedish and Polish–Lithuanian forces intervened on opposite sides, the latter starting the Polish–Muscovite War. Charles IX's forces were expelled from Livonia after major setbacks at the battles of Kokenhausen(1601) and Kircholm (1605). During the later Ingrian War, Charles' successor Gustavus Adolphus retook Ingria and Kexholm which were formally ceded to Sweden under the 1617 Treaty of Stolbovo along with the bulk of the Duchy of Livonia. In 1617, when Sweden had recovered from the Kalmar War with Denmark, several Livonian towns were captured, but only Pernau (Pärnu) remained under Swedish control after a Polish–Lithuanian counter-offensive. A second campaign then started with the capture of Riga