 In 1402, the Luxembourgs reached an agreement with Poland in Kraków, according to which Poland was to purchase and re-incorporate the region, but eventually the Luxembourgs sold it to the Teutonic Order.It was captured by joint Polish-Czech forces in 1433, during the Polish–Teutonic War (1431–1435).When another Polish-Teutonic war broke out in 1454, the Teutonic Knights sold the region to the Margraviate of Brandenburg in order to raise funds for war.