As King Hans sought to assert his authority over Sweden and restore the Kalmar Union, he entered into an alliance with Grand Prince
Ivan III of Moscow, aiming to pressure Sweden from the east. The Finnish colonization had expanded in
Savo and northern
Ostrobothnia over the old borders and
Erik Axelsson Tott had founded the
Olavinlinna Castle on the Russian side of the border in 1475. Hans promised Ivan that he would restore the Russo-Swedish border to the line stipulated by the
1323 Treaty of Nöteborg. At the same time, tensions between Sten and the Swedish Council of the Realm intensified, particularly over his increasingly autocratic style and conflicts with the church hierarchy. These internal divisions created an opening for Hans. In 1494, the Swedish and Danish councils met in
Nya Lödöse and agreed to implement the 1483 Kalmar Recess. Although Sten Sture resisted, he was pressured into ratifying the agreement. A union summit was subsequently planned for
Kalmar in 1495, and King Hans of Denmark arrived in person, expecting to meet with the Swedish Council alongside the Danish and Norwegian councils. On his way from Copenhagen to Kalmar in June 1495, Hans's premier vessel and
flagship, the artillery-carrying carvel
Gribshunden, exploded and sank at anchor near
Ronneby. Hans himself had left the ship prior to the accident, and so was uninjured and able to continue to Kalmar by other means of conveyance. However, Sten repeatedly delayed his appearance by over a month, effectively sabotaging the negotiations. In 1495, Russian forces attacked
Viborg Castle, triggering the
Russo-Swedish War of 1495–1497 and diverting Sten Sture's attention to Finland. Under pressure, he led a delayed and indecisive campaign, hampered by winter conditions and internal disputes. Although the immediate threat to Viborg was repelled before his arrival, Sten's cautious strategy and refusal to compensate departing nobles provoked criticism from powerful figures, including Archbishop
Jakob Ulvsson. By early 1497, political support for Sten had eroded sharply, and upon returning to Stockholm, he was deposed by the council. In the spring of 1498, Ivan's envoys arrived in Stockholm to remind Hans of the agreement and request a formal border demarcation, but he responded evasively. Negotiations continued in 1499 and 1500. In a letter to Ivan III, King Hans stated that, according to the Swedish Privy Council, the territories claimed by Russia belonged to Sweden and could not be ceded. The settlement between Hans and Sten reflected a shared interest in avoiding a drawn-out conflict. While Sten was forced to surrender
Västerås Castle and Dalarna, he retained strategically important holdings such as
Nyköping,
Rekarne, and
Svartsjö. In Finland, he was granted the entire
Diocese of Turku along with Norrbotten as a lifetime fief, while his wife,
Ingeborg Tott, was promised
Häme Castle after his death. These favorable terms highlighted Hans's tactical pragmatism: Sten Sture continued to serve as a counterweight to the influence of the high council, while the king avoided placing Finland under direct royal control, instead entrusting the militarily precarious eastern frontier to Sture. The arrangement was also shaped by long-term considerations: Sten Sture, now elderly and without heirs, posed little dynastic threat. The agreement disappointed some of the Swedish council nobility, especially those aligned with Archbishop Jakob Ulvsson, who had hoped for a stricter settlement and a more assertive Danish presence. == Defeat in Dithmarschen ==