On the other hand, there is the principality of Moldavia. It emerged as a state after the defeat of the Tatars by the King of Hungary, Louis I. The area remained under Hungarian influence and was formally established as a Hungarian fiefdom in 1347 under Dragoș. He was succeeded by Sas, who would be defeated by Bogdan I finishing the Hungarian suzerainty over Moldavia and starting its independence. It is argued, however, that for most (or all) of his reign and on its aftermath, Moldavia remained a Hungarian vassal (or Hungarian-Polish during the union of both from 1370 to 1382). The first Moldavian territorial change would take place a few years later. In 1388, Władysław II Jagiełło wanted money to wage a war against the Teutonic Order, so he asked Petru II of Moldavia for a loan (4,000 rubles). Pokuttya was used as a pledge, and it was ceded to it. This loan was probably never paid. The territory would become a place of dispute between Poland and Moldavia for the next two centuries, and was finally lost by the latter one in 1531 after the Battle of Obertyn. Meanwhile, it lost the ports of Kiliya and Bilhorod-Dnistrovskyi in 1484 to the Ottomans, followed by the annexation of the entire Moldavian coast (Budjak) by them in 1538. In 1711, due to the strategic importance of the town of Khotyn and the area around it, the Ottomans annexed it from Moldavia, settled it with Lipka Tatars and made it a sanjak (a province). Bukovina would later be invaded and annexed by the Habsburgs in 1775, undertaking a strong process of Ukrainization. Moldavia's last major territorial loss took place in 1812. The Ottomans and the Russian Empire would wage a war between 1806 and 1812, which ended with the Treaty of Bucharest that ceded to the latter Bessarabia, the eastern part of the principality. This region, just like Bukovina, suffered severe Russian colonization. Nevertheless, following the Russian defeat in the Crimean War, Moldavia recovered Southern Bessarabia in 1856.