The Battle of Baia (; ) was fought on December 15, 1467, between Moldavian prince Stephen the Great and the Hungarian king, Matthias Corvinus. The battle was the last Hungarian attempt to subdue Moldavia after several previous failures. Corvinus invaded Moldavia as a consequence of Stephen's annexation of Chilia—a fortress and harbour on the coast of the Black Sea—from Hungarian and Wallachian forces. It had belonged to Moldavia centuries earlier. The battle was a Moldavian victory, ending Hungarian claims on Moldavia. Background In 1359, Bogdan I of Moldavia rebelled against the King of Hungary and founded an independent Moldavia. However, the Hungarian attempts to seize control over Moldavia did not end there, and in 1429, Sigismund, Holy Roman Emperor, and also King of Hungary, met with Władysław Jagiełło, King of Poland to try to persuade him to launch a common attack on Moldavia and divide the country in two equal parts—Polish and Hungarian. Sigismund argued that the Moldavian nation did not "owe allegiance to anyone, is accustomed to live by theft and brigandage and so is everyone's enemy." He also complained about not receiving any help for his struggle against the Turks. In the Annals of Jan Długosz, the Polish chronicler wrote the following on Władysław's reply to Sigismund: After the death of Alexander I, the country was thrown into civil strife, in which the two claimants, Peter Aron III and Bogdan II, in order to gain the throne, pledged loyalty to either the Hungarian or the Polish king. The political turmoil lasted until 1457, when Stephen, son of Bogdan, having fled to Hungary and later Wallachia, with Wallachian help, gained the throne and ousted the boyars loyal to Aron. The latter fled to Poland, but was later forced to seek asylum in Hungary, after Moldavia and Poland concluded a new treaty. Stephen's objective was to regain the region of Budjak with the castles of Chilia and Cetatea Albă. The region had previously belonged to Wallachia, but had been incorporated into Moldavia in the late 14th century. Due to the decline of Moldavia during the civil war, the region reverted to Wallachia, with Chilia being co-ruled by Hungary and Wallachia. Foreign relations In 1462, Stephen sent a letter to his cousin, Prince Vlad III Dracula of Wallachia, asking him to return Chilia to Moldavia—a demand that was most likely refused. On 22 June, when Vlad was fighting Sultan Mehmed II