The Moldavian campaign of 1497–1499 was an unsuccessful war led by John Albert of Poland against the Moldavians, supported by their Ottoman suzerains. John Albert set out with an army of 80,000–100,000 men with the objectives of deposing Stephen the Great of Moldavia and replacing him with Sigismund Jagiellon, reconquering the fortresses on the northern Black Sea coast and taking control of Crimea and the Danube Delta.
Background
John I Albert was elected due to his advocacy for an offensive policy against the Ottomans, and he made an alliance with Venice and Hungary for a joint effort against them. Stephen the Great of Moldavia refused to join the alliance fearing that Moldavia would be the main scene of any Polish–Ottoman war. Albert's efforts to displace him led to a quarrel with Ladislas of Hungary who considered Stephen as his vassal. This broke up their recent alliance and as a result, Albert planned on achieving his objectives without any foreign help. After some years of preparation, Albert sent an envoy to Istanbul asking for peace but Bayazid II rejected this and both sides were ready for war by 1497.
Campaign
Albert was able to raise an army of 80,000–100,000 men and 200 cannons, in the summer of 1497 he set out planning to reconquer the fortresses on the northern Black Sea coast and take control of Crimea and the Danube Delta, while Stephen the Great of Moldavia was able to secure Ottoman support. The Polish offensive began in the month of June in 1497, but the Moldavians, supported by the Ottomans, crossed into Bukovina and decisively defeated the Poles at Valea Cosminului (Battle of the Cosmin Forest) and then proceeded to raid into Polish territory as far as Lwów. On 29 October, Konrad III Rudy sent out a detachment of 600 Masovian Knights to relief Albert's forces, but this detachment was destroyed by Stephen's entrusted commander (Sima Boldur) at the Battle of Lențești. On 30 October, Polish forces were lured into another deadly Moldavian ambush, with remnants retreating from Moldavia. From June to July 1498, Moldavian army devastated the south-eastern Polish lands and enslaved up to 100,000 Poles with Ottoman support. Albert's campaign was disastrous and his objectives had failed, so he made peace with the Moldavians and Ottomans in 1499 and recognised Ottoman control of the Black Sea.
Consequences
As a result of this campaign, the Crimean Tatars were now left with a major empire including the entire steppe north of the Crimea from the Dniester to the Volga under the suzerainty of the Ottoman sultan. Polish army suffered 11,000–40,000 casualties in 1497, alongside near complete annihilation of the Masovian and Teutonic Knights.
After the battle of the Cosmin Forest, John I Albert hastily returned to Poland (suffering another major defeat on the way where 5,000 Polish soldiers were killed in Bukovina) and built the Kraków Barbican, fearing an attack by the Ottoman Empire after his successive defeats. The walls of Kraków were strengthened and additional fortifications were built to defend the city in case of a Turkish invasion.