Casimir IV's successor, John I Albert, wanted to grant Moldavia to his younger brother, Sigismund, but Stephen's diplomacy prevented him from invading Moldavia for years. John Albert attacked Moldavia in 1497, but Stephen and his Hungarian and Ottoman allies routed the Polish army in the Battle of the Cosmin Forest. Stephen again tried to recapture Chilia and Cetatea Albă, but had to acknowledge the loss of the two ports to the Ottomans in 1503. During his last years, his son and co-ruler Bogdan III played an active role in government. Stephen's long rule represented a period of stability in the history of Moldavia. From the 16th century onwards both his subjects and foreigners remembered him as a great ruler. Modern Romanians regard him as one of their greatest national heroes, although he also endures as a cult figure in Moldovenism. After the Romanian Orthodox Church canonized him in 1992, he is venerated as "Stephen the Great and Holy" ("Ștefan cel Mare și Sfânt").