The defeat in the Battle of Hemmingstedt on 17 February 1500 hurt John's prestige and in 1501, Sweden renounced him as king. John fought an increasingly more bitter war against Sten Sture and his successor Svante Nilsson, and this conflict meant frictions with both the Danish nobility and the Hanseatic cities, especially Lübeck. In 1509, with the Netherlands acting as arbiter, Sweden agreed to a declaration which recognised John as king of Sweden in principle, but he was never allowed into Stockholm as long as he lived, nor crowned king of Sweden anew.