During the first years of his rule John carried out a balancing policy. By diplomatic means he tried to weaken the position of the Swedish regent Sten Sture, and he also sought new allies—he was the first Danish king to establish political cooperation with Russia. After the 1493 treaty, Ivan III of Russia imprisoned all Hanseatic merchants trading in Novgorod and instigated the Russo-Swedish War (1496–1499). The Hanseatic cities were also troubled by a secret war by Danish privateers. At that time the position of the Hansabund was slowly but steadily declining because of changes in trade routes and the growing opposition against the Hanseatic League in the Northern European naval states.