In 1402, an agreement was reached in Kraków between them and the Poles, under which Poland was to purchase this region, however in the same year the Luxembourgs sold the region to the Teutonic Knights, Poland's arch-enemy.