In 1241, Klodzko became the site of a Mongol raid during the Mongolian Invasion of Europe. However, King Wenceslaus I managed to rally his troops and drove the Mongols out, saving much of Bohemia from Mongolian conquest. The town was granted German city rights under Magdeburg Law between 1253 and 1278, though the exact date is unknown. In 1278 it came under Polish rule again, as it was taken over by the Silesian duke Henry Probus who claimed entire Bohemian Kingdom after death of Ottokar II of Bohemia. In 1290 it was sold to the Dukes of Świdnica and then, in 1301, it was sold to the Dukes of Ziębice. However, in 1334, Duke Boleslav II sold the town back to the Kingdom of Bohemia. The same year Bohemian king John of Luxembourg, relocated the town, which led to a period of fast growth, bringing German settlers to the town. A city hall was built in 1341, and in the following year a brick factory was opened. From 1366, the town has been protected by a group of professional firemen. The town gained significant profits from its location on the ancient road from Bohemia to Poland through mountain passes in the Sudetes.