In 1373, the region became part of the Bohemian Crown Lands, ruled by the Luxembourg dynasty. 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. Under Teutonic rule, the region was neglected, resulting in the town's economic decline, and robberies became widespread. In addition, in the course of the Polish–Teutonic War the town was burnt down in 1433 by Hussite forces marching through. When another Polish-Teutonic war broke out in 1454, the Teutonic Knights sold the region to Brandenburg in order to raise funds for war.